Uso notificaciones de exposición ~ 0.14.0
androide 8+
Uso las notificaciones locales de expo-notifications scheduleNotificationAsync
yo uso eas build
mi manejador:
Notifications.setNotificationHandler({ handleNotification: async () => ({ shouldShowAlert: true, shouldPlaySound: true, shouldSetBadge: false })}, )yo uso canales
Mi canal:
Notifications.setNotificationChannelAsync('sound', { name: 'sound', importance: Notifications.AndroidImportance.HIGH, sound: 'newmessage.wav' })mi notificación:
Notifications.scheduleNotificationAsync({ content: { title, body, sound:'newmessage.wav' }, trigger: { seconds, channelId: 'sound' } })mi aplicación.json:
"expo": { "...." "plugins": [ [ "expo-notifications", {`enter code here` "sounds": ["./assets/newmessage.wav"] } ] ], "...." "android": { "...." "useNextNotificationsApi":true, "permissions":["RECEIVE_BOOT_COMPLETED"]}después de precompilar mi sonido está en android\app\src\main\res\raw
pero después de que el sonido de compilación eas no funciona