I integrated expo notification for Push notification. My project is Expo bare flow
let token;
const { status: existingStatus } = await Notifications.getPermissionsAsync();
let finalStatus = existingStatus;
if (existingStatus !== 'granted') {
const { status } = await Notifications.requestPermissionsAsync();
finalStatus = status;
}
if (finalStatus !== 'granted') {
alert('Failed to get push token for push notification!');
return;
}
token = (await Notifications.getExpoPushTokenAsync(experienceId));
console.log(">>>>>>>>>>>>token",token)
this is my code to get token. It perfectly works on IOS but in Android, it will work in Development. When I get the Release build with android studio, I cannot receive the token in the release build.
if i add any native based library in my project like react-native-firebase etc am not able to use that Library with native modules in my project.
while trying to run the app with the comment react-native run-android
app will be launched but suddenly App crashed with an error. error is given below.
How can I get an expo notification token in release build android and how to fix the configured expo-updates issue.
"native-base": "^2.13.5",
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native": "^0.65.1",
"expo-updates": "^0.8.5",
"expo-notifications": "~0.12.3",
"expo-permissions": "~12.1.1",
"expo": "~42.0.1",