0

I'm trying to make an Android Wear notification to work with my app, and I want it to be Ongoing.

When using setOnGoing, the notification not displayed on the watch.

But I'm sure it's possible, because the google cast notification of youtube cannot be dismissed on the watch.

Can you help? Thanks.

user3184899
  • 3,019
  • 6
  • 30
  • 38

1 Answers1

2

It is possible to show ongoing notifications on Andorid Wear, but NOT from phone (ongoing notifications posted FROM phone won't be shown on watch). It means you need to create a wearable extension to your app and post notification directly from Android Wear device.

So, from Android Wear you can just post a normal ongoing notification and it will be displayed on watch - like you see in some other apps. This is the only way to display an ongoing notifications on Android Wear.

If you want to display an ongoing notification on watch and ongoing notification on phone - you will need to synchronize them. For this purpose there is a great wearable DataApi.

Please read more about DataApi here:
https://developer.android.com/training/wearables/data-layer/index.html https://developer.android.com/training/wearables/data-layer/data-items.html

You can also take a look at my post where I've posted a code demonstrating how to use DataApi in practise: https://stackoverflow.com/a/24896043/3827276

Community
  • 1
  • 1
Maciej Ciemięga
  • 10,125
  • 1
  • 41
  • 48