I am trying distinguish if a notification was opened from the watch or the phone. Currently I am trying to set the contentIntent
for the notification builder which also appears on the watch as an "Open on phone" action. I want to be able to set a different intent just for the watch so that I can add other parameters to the intent, but I cannot find the right way to do it.
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(context);
notificationBuilder
.setContentTitle(contentTitle)
.setContentText(contentText)
.setContentIntent(contentIntent)
.extend(wearableExtender)
I've tried to add a wearable extender and the action for "Open on Phone" stopped working. I want to know if there is a way to disable the "Open on Phone" button for the wearables and still maintain a setContentIntent()
for the phone notification? I've also tried setContentAction()
on the extender and "Open on Phone" button, but it still doesn't work.
Any ideas on how to get this working?