React-native-onesignal: Android notifications register without prompt?

Created on 31 Mar 2018  ·  3Comments  ·  Source: OneSignal/react-native-onesignal

Sorry if it’s a silly question, I’m not too familiar with Android workings. So Android users don’t get a prompt for getting notifications, they are just automatically subscribed?

Most helpful comment

@ilyakar @djalmaaraujo Android does not have a system prompt for notification permissions like iOS does, they are enabled by default. Android 6.0 (API Level 23) did add runtime permission prompts however notifications were not one of them.

If you wish to not auto subscribe your users you may call OneSignal.setSubscription(false); after init on the first app start. Then when you prompt and they accept call OneSignal.setSubscription(true);.

All 3 comments

@ilyakar I might be wrong, but after buildTools 25, the user accepts to receive notifications before installing the app. :)

@ilyakar @djalmaaraujo Android does not have a system prompt for notification permissions like iOS does, they are enabled by default. Android 6.0 (API Level 23) did add runtime permission prompts however notifications were not one of them.

If you wish to not auto subscribe your users you may call OneSignal.setSubscription(false); after init on the first app start. Then when you prompt and they accept call OneSignal.setSubscription(true);.

Thank you for explaining, Josh. That’s what I was hoping for.

Kind regards,
Ilya

On 2 Apr 2018, at 21:27, Josh Kasten notifications@github.com wrote:

@ilyakar @djalmaaraujo Android does not have system prompt for notification permissions like iOS does, they are enabled by default. Android 6.0 (API Level 23) did add runtime permission prompts however notifications were not one of them.

If you wish to not auto subscribe your users you may call OneSignal.setSubscription(false); after init on the first app start. Then when you prompt and they accept call OneSignal.setSubscription(true);.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

Was this page helpful?
0 / 5 - 0 ratings