简体   繁体   中英

How to make Bluemix push notifications play sound and vibrate on Android

I am using the Bluemix Push Notification service and the ibm-mfp-push Cordova plugin to deal with Push notifications in my Ionic app.

I would like notifications to vibrate and play sound when they are received. I managed to do it on iOS. But I can't find a way to do it on Android.

Is there any way to configure the Bluemix push service and the Cordova plugin to achieve what I want to do?

I saw this post that pretends to give a solution. But unfortunately it seems to be applicable to the Android client sdk only, and not to the Cordova sdk.

In order to enable custom Android push notification sounds, simply include your custom sound file in your Android native resources directory.

When you go to send a message, either add the correct path to the custom sound file in the dashboard, or use the Push Swagger API to do the same.

Two things:

The Push team recently updated from ibm-mfp-push to bms-push , so it may be a good idea to upgrade. (This is compatible with the new bms-core Cordova SDK.)

Like David said earlier, you will need to make a native change in the correct directory , so it plays the sound files.

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