Notification not working in play store

I created a notifications feature in my application and when I run it through Expo Go it receives notifications normally now when it is in production it is not working I put an alert with the token to be able to check it and it does not even run the token
Notifications.setNotificationHandler({
handleNotification: async () => ({
shouldPlaySound: true,
shouldSetBadge: false,
shouldShowAlert: true
})
})
useEffect(() => {
(
async () => {
console.log(‘====================================’)
alert((await Notifications.getExpoPushTokenAsync()).data)
console.log(‘====================================’)
const { status: existingStatus } = await Notifications.getPermissionsAsync()
let finalStatus = existingStatus
if (existingStatus !== ‘granted’) {
const { status } = await Notifications.requestPermissionsAsync()
finalStatus = status
const tokenExpo = (await Notifications.getExpoPushTokenAsync()).data
const user = await AsyncStorage.getItem(‘user’)
alert(tokenExpo)
axios.patch(${url}${version}/usuario/setTokenApp , {
USUA_SIGLA: user,
USUA_APP_TOKEN: tokenExpo
})
.then(() => {
console.log(‘====================================’)
console.log(tokenExpo)
console.log(‘====================================’)
})
.catch((e) => {
console.log(‘====================================’)
console.log(e.response)
console.log(‘====================================’)
})
}
if (finalStatus !== ‘granted’) {
alert(‘Failed to get push token for push notification!’)
}
}
)()
}, )
{
“cli”: {
“version”: “>= 3.8.1”
},
“build”: {
“development”: {
“developmentClient”: true,
“distribution”: “store”,
“ios”: {
“resourceClass”: “m-medium”
}
},
“preview”: {
“distribution”: “store”,
“ios”: {
“resourceClass”: “m-medium”
}
},
“production”: {
“ios”: {
“resourceClass”: “m-medium”
}
}
},
“submit”: {
“production”: {
“android”: {
“serviceAccountKeyPath”: “./pc-api-8866468696164539922-123-25fcb8787379.json”,
“track”: “production”
}
}
}
}
{
“expo”: {
“name”: “Sgn sistemas”,
“slug”: “sgn_mobile”,
“version”: “11.0.0”,
“orientation”: “portrait”,
“icon”: “./src/assets/img/iconSgn1.png”,
“userInterfaceStyle”: “light”,
“notification”:{
“icon”:“./src/assets/img/iconSgn1.png”
},
“splash”: {
“image”: “./src/assets/img/logo.png”,
“resizeMode”: “contain”,
“backgroundColor”: “#ffffff
},
“updates”: {
“fallbackToCacheTimeout”: 0,
“url”: “https://u.expo.dev/0f9cb77e-4c00-4a14-8951-ced04f6e6c41
},
“assetBundlePatterns”: [
“**/*”
],
“ios”: {
“supportsTablet”: false,
“buildNumber”: “1”,
“bundleIdentifier”: “Y”
},
“android”: {
“adaptiveIcon”: {
“foregroundImage”: “./src/assets/img/iconeSGN.png”,
“backgroundColor”: “#FFFFFF
},
“package”: “com.inova_sgn.sgn_mobile”,
“versionCode”: 11
},
“web”: {
“favicon”: “./src/assets/img/logo.png”
},
“extra”: {
“eas”: {
“projectId”: “0f9cb77e-4c00-4a14-8951-ced04f6e6c41”
}
},
“plugins”: [
[
“expo-notifications”,
{
“icon”: “./src/assets/img/iconSgn1.png”,
“color”: “#f1f1f1”,
“sounds”: ,
“androidMode”: “default”,
“androidCollapsedTitle”: “Sgn mobile”,
“iosDisplayInForeground”: true,
“mode”: “production”
}
]
],
“runtimeVersion”: {
“policy”: “sdkVersion”
}
}
}

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