react-native-firebase-docs icon indicating copy to clipboard operation
react-native-firebase-docs copied to clipboard

Update receiving-messages.md

Open VilleMiekkoja opened this issue 5 years ago • 3 comments

Improve docs; Request permissions section only relevant for iOS. On android, it always resolves, and has no use or effect on anything.

VilleMiekkoja avatar Dec 15 '19 18:12 VilleMiekkoja

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

mikehardy avatar Dec 15 '19 19:12 mikehardy

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 🎉

gianpaj avatar Feb 06 '20 11:02 gianpaj

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Mar 14 '20 12:03 CLAassistant