Android Wear 上的持续通知 [英] Insistent notification on Android Wear
问题描述
Notification.FLAG_INSISTENT 适用于我的 Android 设备.通知反复振动和响起.但是,它在我的 Android Wear 上只振动一次.
Notification.FLAG_INSISTENT works on my Android device. Notification vibrates and sounds repeatedly. However it only vibrates once on my Android Wear.
我已按照 Android 开发人员指南创建了 Android Wear 通知,但没有成功.https://developer.android.com/training/wearables/notifications/creating.html
I have followed the Android Developer guide to create an Android Wear notification, but no luck. https://developer.android.com/training/wearables/notifications/creating.html
我想要股票 Android 闹钟应用程序通知的效果.
I want the effect of the stock Android Alarm Clock app's notification.
在我深入研究应用源代码之前的任何提示?
推荐答案
您需要将 Android Wear 应用添加到现有项目中.使用 Vibrator 类振动手表.注意:手持设备应用和Wear应用的包名必须相同.
You need to add an Android Wear app to your existing project. Vibrate the watch with the Vibrator class there. Note: The package names of both the handheld device app and Wear app must be the same.
这篇关于Android Wear 上的持续通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!