Warning | ||
---|---|---|
| ||
Please note that on android the Android foreground, push open will not be shown |
Step 1 - Listen to "deviceready" event (iOS only)
Code Block | ||||
---|---|---|---|---|
| ||||
document.addEventListener('deviceready', this.onDeviceReady, false); |
Step2 - Listen to resume event and activate it explicitly for the first time (iOS only)
Code Block | ||||
---|---|---|---|---|
| ||||
onDeviceReady: function() { onResume(); document.addEventListener("resume", onResume, false); app.receivedEvent('deviceready'); console.log('Received Event: ' + id); }, |
Step 3 -
...
Implement the onResume function (iOS only)
When the application is resumed resumes, the following code will check if it was resumed due to a push notification. if If so, feel free to extract the relevant custom field from the payload.
Code Block | ||||
---|---|---|---|---|
| ||||
function onResume() { MappPlugin.getLastPushPayload(function (json) { var jsonString = JSON.stringify(json); if (jsonString && jsonString.length > 2) { alert("Last Push Payload: " + jsonString); } }); } |
Step
...
4 - Send push notification from Appoxee dashboard
In the message creation wizard place , insert the deep link address.