1

I am trying to implement a way to detect the notifications that are sent to the android wearable devices.

After googling around, I have found it is not possible to use notificationListenerService on the wearable.

In current implementation, I have implemented the notificationListenerService on the mobile handheld and am using the DataLayer to send the notifications over.

My issue is:

With the notificationListener, it detects everything that appears. Is there a reliable way to detect which notifications will be sent to the wearable? For example, I don't want twilight or other things that are not sent to the wearable to be sent across the dataLayer

AliceOS
  • 53
  • 1
  • 4
  • In fact, apps can generate notifications directly on the watch that do not appear on the phone - none of those will be picked up by your approach either. – ianhanniballake Feb 12 '15 at 05:46
  • @ianhanniballake yes this is another issue. To my understanding, I don't believe there is any possible workaround. – AliceOS Feb 13 '15 at 03:34

1 Answers1

0

Yes, it is possible, just filter your Notifications in NotificationListenerService by FLAG_LOCAL_ONLY which is public. It is set by .setLocalOnly() and if it is true notification is not send to Wear device.

Michał Tajchert
  • 10,333
  • 4
  • 30
  • 47