When I send a push notification to a device from the message center and then click on the notification on my Android device, it opens the app to the default page, which is the functionality I'm going for.
However, when I send a push notification via the API and then click on the notification on my Android device, it opens a screen with the title of the notification in a black bar with a left arrow in it at the top, and then a white area below that with the text of the notification displayed at the top. When I tap the left arrow in the black bar, it takes me to the screen I want to be on.
Here is my payload; what can I do to make tapping the notification open the app to the default app screen?
const payload = {
audience: {
channel: channelId,
device_type: device.toLowerCase()
},
notification: {
alert: pushNotificationToSend.body
},
options: {
expiry: pushNotificationToSend.expiry
},
message: {
title: pushNotificationToSend.title,
body: pushNotificationToSend.body,
content_type: "text/html",
},
in_app: {
alert: pushNotificationToSend.body,
display_type: "banner",
expiry: pushNotificationToSend.expiry,
display: {
position: "top"
}
},
device_types: [ device.toLowerCase() ]
};
FYI the app is a Meteor app, built for Android. It uses ostrio:flow-router-extra for routing. The default route (the one I want to open) is /student/dashboard/.
I understand that for deep linking there's some configuration and potentially writing of code, but this works w/o any of that for messages sent from the message center so I don't want to reinvent the wheel for something that already works.
Any help is appreciated!
Comments
2 comments