-
Notifications
You must be signed in to change notification settings - Fork 379
Open
Labels
Description
What happened?
When calling OneSignal.Notifications.requestPermission(true); on Android, the promise is never resolved and no Android system notification prompt is shown. This makes it so users are unable to get notifications on Android without permission.
const permission = await OneSignal.Notifications.getPermissionAsync();
if (!permission) {
const result = await OneSignal.Notifications.requestPermission(true);
console.log("notification permission result", result); // This is never logged
if (result) {
await OneSignal.User.pushSubscription.optIn();
await updateNotificationPermissions({
variables: {
input: {
push: true,
email: null,
},
},
});
}Steps to reproduce?
1. Install `react-native-onesignal` on Expo
2. Call await OneSignal.Notifications.requestPermission(true);
3. Check if code executes afterWhat did you expect to happen?
It should open the Android system notification permission prompt.
React Native OneSignal SDK version
5.2.13
Which platform(s) are affected?
- iOS
- Android
Relevant log output
Code of Conduct
- I agree to follow this project's Code of Conduct