How would i trigger the app to navigate (ie app.router.navigate(URL)) from native ios or android events? For example my app gets a push notification referencing a page in the app and when the user opens the notification we would want the app to open to this path.
hi, i use AWS SNS to send pushes to apps
just test it on android;
Setup:
f7-vue V1
<plugin name=“phonegap-plugin-push” spec="^2.2.3">
// push JSON data
{
"default": "Test android navigate",
"GCM": "{ \"data\": { \"message\": \"Test android navigate\" ,\"url\":\"myPage\"} }"
}
...
const push = PushNotification.init({
android: {
senderID: id
},
browser: {
pushServiceURL: 'http://push.api.phonegap.com/v1/push'
},
ios: {
alert: "true",
badge: "true",
sound: "true"
},
windows: {}
});
...
// and to navigate
push.on('notification', function (data) {
console.log(data)
alert('Event=notification, message=' + JSON.stringify(data))
if (data.url) this.$f7.mainView.loadPage(data.url)
});