SDK Version:42.0.0
Platforms(Android/iOS/web/all):Android
Hello everyone
We’ve made an app that has push notifications. We get the user token and save it in a database using and endpoint on our server so later we can send the notifications to the saved tokens.
We send the tokens via PHP Curl.
The notifications are sent and siplayed correctly on Android and iOS but on Andorid theres no notification sound ( It works correctly on ios ).
We have followed a lot of answers to this problem and we couldnt find a working one.
At the moment we create the notification channel this way ( the channel gets created correctly, as it laters appear on android, on the app info ).
componentDidMount() {
try {
if (Platform.OS === "android") {
Notifications.setNotificationChannelAsync("coiina", {
name: "miNoti",
importance: Notifications.AndroidImportance.MAX,
vibrationPattern: [0, 250, 250, 250],
lightColor: "#FF231F7C",
priority: "max",
sound: true, //We've tried using true and "default" here, same result
});
}
} catch (error) {
console.log(error);
}
}
The problem is that, on the APP info sound appears always as disabled, no matter how much examples and solutions we try, it always appear as disabled.
Couple of answers we found around said that, since notifications are not counted as a real permission on android, theres no way to enable the sound and it is the user who has to activate it manualy.
Also one of those answers, said that some apps that comes with that option enable (i.e Whatsapp, Telegram, etc ) are whitelisted by android developers and thats why the come with the sound enabled by default (It makes no sense to me, but who knows ).
Thanks for your time