androidwear-osandroid-wear-notification

Custom UI for Android Wear Notifications


Hii I want to create Custom UI for android wear notification, and not AW app. Please suggest if there are any libraries or anything available for this.


Solution

  • It is not available yet, most likely it will be in the future.

    EDIT: Future is now. You can do this by passing own custom Activity by setDisplayIntent(), code sample:

    public Notification buildNotification(Context context) {
                Intent displayIntent = new Intent(context, AnimatedNotificationDisplayActivity.class);
                displayIntent.putExtra(BasicNotificationDisplayActivity.EXTRA_TITLE, context.getString(nameResId));
                PendingIntent displayPendingIntent = PendingIntent.getActivity(context, 0, displayIntent, 0);
                return buildBasicNotification(context)
    .extend(new Notification.WearableExtender()
    .setDisplayIntent(displayPendingIntent))
    .build();
    }