[英]Phonegap: how to play sound on android for a push notification
I have a PhoneGap app with push notifications working on iOS and Android. 我有一个PhoneGap应用程序,可以在iOS和Android上运行推送通知。 The only problem I'm facing now for several hours is that on Android I only get a tiny badge on top of the screen for my push notification, whereas on iOS i get a sound, a notification on my lockscreen, notification center, etc, the full monty.
我现在面对几个小时的唯一问题是,在Android上我只在屏幕上方获得一个小徽章以获取我的推送通知,而在iOS上我得到声音,在我的锁屏,通知中心等处发出通知,光猪六壮士。
Is something like this possible on Android as well? 在Android上也可以这样吗? Display a message on your lock screen or at least play a sound or vibrate when a push notification comes in?
当推送通知进入时,在锁定屏幕上显示消息或至少播放声音或振动? Is it something that needs to be configured in PhoneGap?
是否需要在PhoneGap中配置? Or do I need to add some JS to my app or PHP code to my server script?
或者我需要将一些JS添加到我的应用程序或PHP代码到我的服务器脚本?
你需要使用cordova的插件: https : //github.com/katzer/cordova-plugin-local-notifications
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.