如何显示在Android Wear设备只通知 [英] How to show notification on Android Wear device only

查看:152
本文介绍了如何显示在Android Wear设备只通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有一种方法,以显示在手机上正常通知区域上,而不是只可穿戴使用NotificationManagerCompat通知?

Is there a way to show a notification using NotificationManagerCompat on a wearable only and not in the normal notification area on the phone?

推荐答案

而不是创造的手机上收到通知,从手机使用的消息API 。然后,当你收到关于耐磨的消息,使用相同的通知API在你的穿戴式应用code(而不是在手机应用程序) - 这将提高对可穿戴的通知

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.

这篇关于如何显示在Android Wear设备只通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆