react-native-firebase-docs
react-native-firebase-docs copied to clipboard
Update receiving-messages.md
Improve docs; Request permissions section only relevant for iOS. On android, it always resolves, and has no use or effect on anything.
I also fear it may have changed with Android 10 - I'm not sure. Have you consulted the docs on react-native-permissions? Looks like it may be possible for Notifications to be disabled in Android under some cases:
https://github.com/react-native-community/react-native-permissions/blob/master/android/src/main/java/com/reactnativecommunity/rnpermissions/RNPermissionsModule.java#L89
So even though in v5 of react-native-firebase it always resolves to true, in reality now (after v5 here was written, and is now orphaned) it is a good idea to check.
For that reason I suggested adding a pointer to the 'react-native-permissions' library and mentioning it should be used prior to calling requestPermissions here, to make sure you really are handling permissions correctly
I strongly suggest adding this with Mike's addition. I was getting an FCM push token (somehow) but the app was still not registering for Push Notifications with iOS (no Notifications access under the Settings -> App).
After adding react-native-permissions
and its requestNotifications()
method the app finally prompted of the access 🎉