Hi there, I need some help on getdevicePushTokenAsync(). I’m trying to integrate with a third party push server, and I get the token ok, and send it off to the server.
The message seems to send ok from their server - but it’s never received in the app - what could I be doing wrong or what more should I need to do?
I’m in the standalone app via Expo. (I’m trying to detach just now)
I can get the token just fine - it comes through ok. I’m using the updated
getDevicePushTokenAsync(config)
with
config = {
gcmSenderId: "********"
};
I then pass this token to the 3rd party Push Notification server. This PN server already exists and services the current app (we’re developing), to send to APNS and GCM.
The 3rd party server gets the token ok, and the server has been configured with the Server Key to match my Sender ID.
On testing the Push Notification, the feedback is the notification was successfully sent, but no notification appears.
The app is not live on the Play Store, it’s an APK that’s been installed.
Any help would be greatly appreciated as I would really prefer not to eject unless I really have to.
@davidbova I’d recommend reaching out to some other people who have used this. See this thread https://github.com/expo/expo/pull/258. This api is hard for us to test and has been mostly maintained by people in the open source community. It looks like you’re doing everything right so I’m not sure exactly what’s going wrong.
I used pushtry.com to push a test push notification. It takes in the device token, a suggested format for the message, and the Server Key (corresponding to the Sender ID you must pass for Android - get this in the FCM console under Settings/Cloud Messaging).
I was able to send a push notification to the app just fine. So this leads me to think there is a problem on the PN server, or the notification message is not in the expected format.