1

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:

  1. Why does OneSignal.promptForPushNotificationsWithUserResponse() not prompt me for permission on Android the way it does on iOS?

  2. 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?

gkeenley
  • 6,088
  • 8
  • 54
  • 129

1 Answers1

2

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.

patelhash
  • 182
  • 8