I want to vibrate with Monaca push notification

Asked 2 years ago, Updated 2 years ago, 50 views

When you send a push notification in Monaca, the notification appears, but it does not vibrate.

The code below is written in index.html, but
In the first place, the event does not run in monaca.cloud.Push.setHandler.
Please let me know if there is anything wrong.

// Push notification vibration check
ons.ready(function(){
  monaca.cloud.Push.setHandler(function(data){
    navigator.notification.vibrate(1000);
    });
});

Also, I have already confirmed the notification settings on the iPhone side.
Thank you for your cooperation.

monaca

2022-09-30 17:10

1 Answers

I'm sorry.I solved myself.
The plug-in configured from the beginning was not enabled for the Monaca debugger.

Resolved by enabling and building the navigator.notification setting in the Cordova plug-in.


2022-09-30 17:10

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.