Reputation: 2816
How to Disable my App from Appearing on Android Wear Devices? It seems that my app integrates automatically with Android Wear (notifications mirroring) but I want to disable it...
Upvotes: 2
Views: 470
Reputation: 6635
To keep your app's [phone] notification from being mirrored to Android Wear, call setLocalOnly(true)
on the Notification.Builder
(or NotificationCompat.Builder
, if you're targeting SDK < 20) that you use to create the notification.
For example:
NotificationCompat.Builder bob = new NotificationCompat.Builder(context)
.setContentTitle(title)
.setContentText(content)
.setLocalOnly(true);
(the last line is the important one)
Documented here: http://developer.android.com/reference/android/support/v4/app/NotificationCompat.Builder.html#setLocalOnly(boolean)
Upvotes: 1