1

I have a few notifications running on my app built with NotificationCompat

Depending on the type, they show background bitmaps, or list of text, also most of them have 1 or 2 actions using the code:

builder.addAction(R.drawable.ic_notification, text, pendingIntent)

some of those actions makes sense for a watch (for example: "like" or "reply") and some doesn't (for example: "view album").

I thought I could use the setLocalOnly(boolean) method for it, but I found out that it is applied to the whole notification, not just to individual actions.

I've also been checking on NotificationCompat.Action and NotificationCompat.Action.WearableExtender but couldn't find anything that would be relevant.


So the question:

is there a way to make the notification show on the watch, but only with some of the actions but not others?

4

1 回答 1

1

请参阅“指定可穿戴设备操作”段落中的文档

于 2015-01-08T16:55:59.093 回答