In my React Native app, I want to prompt the user to consent to receiving OneSignal push notifications. I have the code OneSignal.promptForPushNotificationsWithUserResponse()
, which on iOS successfully prompts the user, but on Android it doesn't. When I test on my Android device, the device does still get registered and I can send it push notifications. But on another user's Android, they report that they can't receive notifications.
What I Want To Know:
Why does
OneSignal.promptForPushNotificationsWithUserResponse()
not prompt me for permission on Android the way it does on iOS?Is there something I can do to make Android devices get prompted for permission, such that there won't be some devices that can't receive notifications?
You need targeted SDK version as 33, anyways refer to https://documentation.onesignal.com/docs/how-to-prompt-for-push-permissions-with-an-in-app-message && https://documentation.onesignal.com/docs/react-native-sdk-setup .
It'll definitely help you figuring it out further.