简体   繁体   中英

How to show notification on Android Wear device only

有没有办法只在可穿戴设备上使用NotificationManagerCompat显示通知,而不是在手机上的正常通知区域显示通知?

Instead of creating a notification on the phone, send a message from the phone to the wearable using the Messaging API . Then when you receive that message on the wearable, use the same notification API in your wearable app code (instead of in the phone app) - this will raise a notification on the wearable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM