Open corresponding app on Handheld without notification from Android Wearable (Gear live)

感情迁移 提交于 2019-12-13 04:46:44

问题


I would like to develop an app on the wearable wich should be able to launch an app on my Handheld device, without the notification standard ("open on device") action. It should start the app on the handheld, even if the Handheld App is closed at the moment. Is there a solution to achieve this. I can't find it in the documentation. If I overread that in the official doc., please post a link.


回答1:


To do that, you have to use the Wearable Data Layer API.

Just send a message using the Message API from the Android Wear device to the handheld's one. The WearableListenerService of your handheld app can then launch an Intent to open the app.



来源:https://stackoverflow.com/questions/27189341/open-corresponding-app-on-handheld-without-notification-from-android-wearable-g

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!