Hi, I’m developing an android app using expo sdk 33 and I’m having a problem regarding to our app’s push notification.
I just found out that Notifications.getExpoPushTokenAsync() is not returning any token. I have followed this in implementing push notifs in our app and everything is right on track when we’re at expo sdk 32, now registerForPushNotifications stops at Notifications.getExpoPushTokenAsync() and returns nothing.
@patofet- you need to be using a physical device to get the push token, and also have appropriate permissions asked for in your app. Go ahead and test this example snack on your device. It should print the push token to the console.
@charliecruzan Having the same experience from before. We’re not receiving any response from Notifications.getExpoPushTokenAsync() on both of our physical & emulator androind phone (Using SDK 33)
One thing that we do in our code is to put if (Constants.isDevice) {... before the call to Notifications.getExpoPushTokenAsync(), and then do something like an else console.warn('push notifications are only available on physical devices').
This helps avoid some confusion when running on emulators.