Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I create notification that is different on device and wear?

Basically, I am wondering if it is possible to create two different notifications and how - one for Android Device and other for Android Wear?

For example: I want to have just setContentText, but on Android device I want setContentTitle and setContentText

There is currently no possibility to show notification just on Wear (like setLocalOnly with device only - look for more).

like image 837
gabriel.gircenko Avatar asked Feb 13 '23 01:02

gabriel.gircenko


1 Answers

I think the Synchronized Notifications sample that comes with the Android Wear SDK may be useful to look at. It gives three simple types of notifications: (1) A phone-only notification (2) A watch-only notification (3) A pair of synchronized phone and watch notifications where the content shown on the watch notification is different from the one on the phone. They are synchronized in the sense that dismissing one results in dismissal of the other one; all based on the Data Layer apis.

I think the third use case is most relevant to you.

like image 125
Tony Wickham Avatar answered Feb 15 '23 13:02

Tony Wickham