Unable to get device token

Hello, i am trying to get device token for push notifications.
As per the documents given in below link
https://docs.expo.io/versions/v19.0.0/guides/push-notifications.html#content

When i test my code through expo app. Everything works fine and am getting device token.
But when i build a standalone app using exp build:android command then application stucks at

  // Get the token that uniquely identifies this device
  let token = await Notifications.getExpoPushTokenAsync();

Hence, i am not able to get device token device for standalone app.

Can anyone please help me to figure out the problem.

1 Like

Hey @jaygajjar77 - sorry you’re having trouble with this. Could you let me know which sdkVersion is in your app.json, and also when you made this build? (e.g. today/sometime in the past week?) Thanks so much.

My sdk version is “19.0.0”.

please update to the latest sdk version, sdk 19 will be removed shortly and i’m unable to repro this in sdk25

I tried to update to sdk25 but after updating my code dosent work.

I am getting below error after updating to sdk25

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