I've an application for Android mobile and wear-os with same package name as companion app. When their is notification came on Mobile for my App and Mobile is not in use then notification received on watch and I want to open watch app from this notification but their is an option on watch as Show in phone but their is no option to open companion app. Is their any option for open watch app from default notification received from mobile to watch? Thank you
I'm using this code
/*******************************************
* Wear Notification Block Started
*********************************************/
Intent wearAppIntent = new Intent(this, WearMainActivity.class);
PendingIntent wearAppPendingIntent = PendingIntent.getActivity(this, 108, wearAppIntent, PendingIntent.FLAG_IMMUTABLE);
NotificationCompat.Action wearAppAction = new NotificationCompat.Action.Builder(R.drawable.ic_stat_ic_notification, "Open Wear App", wearAppPendingIntent).build();
/*******************************************
* Wear Notification Block Ended
*********************************************/
NotificationCompat.Builder notificationBuilder = new NotificationCompat.Builder(this, channelId);
notificationBuilder
.setSmallIcon(R.drawable.ic_stat_ic_notification)
.setContentTitle(title)
.setContentText(body)
.setTicker(body)
.setAutoCancel(true)
.setSound(defaultSoundUri)
.setContentIntent(pendingIntent)
//.setOngoing(true)
.addAction(wearAppAction);
//.extend(new NotificationCompat.WearableExtender().setContentAction(0)).addAction(wearAppAction);
Any help will be appreciated.
Thank You!