Challenge: Notifications on Android Wear

Since you used NotificationCompat and NotificationManagerCompat, your notifications will automatically appear on an Android Wear device if the user has it paired with an Android device running your app. Users who receive the notification on a Wear device can swipe left to be presented with the option to Open the app on the connected handheld. Pressing Open on the Wear device will issue the notification’s pending intent on the connected handheld device.

To test this out, set up an Android Wear emulator and pair it with a handheld device running your app. Details about how to do this can be found on http://​developer.android.com.

Get Android Programming: The Big Nerd Ranch Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.