简体   繁体   中英

Phonegap: how to play sound on android for a push notification

I have a PhoneGap app with push notifications working on iOS and 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.

Is something like this possible on Android as well? 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? Or do I need to add some JS to my app or PHP code to my server script?

你需要使用cordova的插件: https//github.com/katzer/cordova-plugin-local-notifications

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM