Sometimes, you just want to trigger and send out push notification immediately after user has performed specified action in the app. Now here is the way for you to trigger push notification easily without any scheduling.
Here’s an example
<script>
jQuery(function($){
//Send push notification
var web_data = [{
"type": "notification",
"data": {
"title": "Sample Notification Title",
"body": "Sample Notification Content",
"url": "https://some-page-in-your-app.com", //The web app page you would like to redirect your users to when user clicks on the notification
},
}];
window.top.ReactNativeWebView?.postMessage(JSON.stringify(web_data));
});
</script>