I've been playing around with Android Wear and making some dummy apps. What I've noticed is that Android Wear doesn't seem to show the notifications that are ongoing,i.e., notifications with setOngoing(true)
.
Any way to show these notifications on Wear???
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
I haven't tried yet "playing" with Android Wear SDK, but I guess that if there is a way to make ongoing undismissable notifications - it should be in conjuction with the
Service.startForeground()
Service method.. exactly like it works with the hosting android device...Our notifications show up with
setOngoing(true)
andService.startForeground
but they didn't on the first day the SDK was out, might've been an update to the Android Wear Preview app?On-going notifications will not show up on Wearable devices. Instead you have to implement a Wear App on the wearable and show cards from there.
barkside's answer is correct. I recently wrote an article describing the steps in details, but basically:
A sample app is available here: https://github.com/doubleencore/WearOngoingNotificationSample
And step-by-step directions are available here: http://www.doubleencore.com/2014/07/create-custom-ongoing-notification-android-wear/
If you using
service
to play music, Wear takes notification fromRemoteControlClientCompat
and keep it ongoing while music is playing. It will looks like Play Music does.