Notification.WearableExtender


public static final class Notification.WearableExtender
extends Object implements Notification.Extender

java.lang.Object
   ↳ android.app.Notification.WearableExtender


Helper class to add wearable extensions to notifications.

See Creating Notifications for Android Wear for more information on how to use this class.

To create a notification with wearable extensions:

  1. Create a Notification.Builder, setting any desired properties.
  2. Create a Notification.WearableExtender.
  3. Set wearable-specific properties using the add and set methods of Notification.WearableExtender.
  4. Call Notification.Builder.extend(Extender) to apply the extensions to a notification.
  5. Post the notification to the notification system with the NotificationManager.notify(...) methods.
 Notification notif = new Notification.Builder(mContext)
         .setContentTitle("New mail from " + sender.toString())
         .setContentText(subject)
         .setSmallIcon(R.drawable.new_mail)
         .extend(new Notification.WearableExtender()
                 .setContentIcon(R.drawable.new_mail))
         .build();
 NotificationManager notificationManger =
         (NotificationManager) getSystemService(Context.