Sdk 28 Notifications.getExpoPushTokenAsync() not working on standalone Android build


#1

Using Notifications.getExpoPushTokenAsync to get fcmToken works fine with Expo. But not on Android standalone build when running Expo sdk 28. I am using Expo push notifications with FCM. Anyone got this working?


#2

Hey @magnusros,

Can you provide more information regarding this issue? Like what is happening when you call the getExpoPushTokenAsync function? You can use the follow flags --minify and --no-dev with the exp CLI to get the same bundle that is served on a published project.

Cheers,

Adam


#3

Hi @adamjnav,

Thanks for fast reply. I re-tested today and now it is working without any code change.
Yesterday getExpoPushTokenAsync didn’t gave any response at all (no time out, wait forever…). Today I get response instant.
Should I be worried about this? Is it recommended to save token in AsyncStorage if this should happen? Or can this problem be related to that I uploaded my FCM server key to Expo server yesterday and it takes some time before it start working?

Thanks/
Magnus


#4

We had the same issue yesterday. getExpoPushTokenAsync() would never resolve. At some point, it just started working again with no code changes. Could this be related to an Expo server issue of some kind?


#5

Sorry I still have problem with standalone build for Android. “exp build:android” never resolve token.

But when running “exp start --no-dev --minify” and testing on Android device I get token. Also when running Expo XDE and “exp build:ios”


closed #6

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.