-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Description
Description
I’m developing a React Native app with push notifications.The Notification triggers from WebSocket. Currently, my AndroidManifest.xml includes:
My app uses a foreground service for push notifications, and it still receives messages even after the app is killed.
Recently, Google Play flagged my app with the following message:
“Permissions for Foreground Services: Play Console declaration and/or app description in Google Play Store does not sufficiently demonstrate the use of permission..”
I want to make my app compliant with Play Store rules.
My questions:
Do I need to remove the FOREGROUND_SERVICE_DATA_SYNC permission if I’m only handling push notifications?
Is there a recommended way to receive push notifications after the app is killed without using a foreground service?
How do other React Native developers implement FCM / push notifications that comply with Google Play foreground service policies?
Any guidance or sample implementation would be appreciated.
Steps to reproduce
1.Install app with npx
React Native Version
0.83.1
Output of npx @react-native-community/cli info
info Fetching system and libraries information...
System:
OS: Windows 11 10.0.26100
CPU: (8) x64 Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz
Memory: 3.62 GB / 15.87 GB
Binaries:
Node:
version: 20.19.4
path: C:\nvm4w\nodejs\node.EXE
Yarn: Not Found
npm:
version: 10.8.2
path: C:\nvm4w\nodejs\npm.CMD
Watchman: Not Found
Screenshots and Videos
No response