我为播放音频流的 phonegap 5.1 编写了我的第一个 android 应用程序。由于找不到结果:如何在锁屏和下拉状态栏中显示音频控件和音频流的元信息?
我正在使用 org.apache.cordova.media 插件。
最佳答案
我的建议是,使用 https://github.com/katzer/cordova-plugin-local-notifications - 我在 android 上使用它,使用最新的 Lollipop ,你应该能够显示带有操作按钮的卡片通知。
调整插件以添加操作按钮应该相当容易。检查这个http://developer.android.com/guide/topics/ui/notifiers/notifications.html
对于通知的实际内容(歌曲标题、长度...),您需要使用媒体插件 API 自行填充。
关于javascript - 手机间隙 : Showing audio controlls and meta informations of my audio stream in the lockscreen and the dropdown status bar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32504235/