react-native-background-worker
react-native-background-worker copied to clipboard
android.app.ForegroundServiceStartNotAllowedException: startForegroundService() not allowed due to mAllowStartForeground
Describe the bug foregroundServices not allowed exception is coming only in android12 devices. here iam using react-native-background-worker to fetch foreground service(iam calling one api to notify something to user) when my app is in background.
To Reproduce Steps to reproduce the behavior:
- Go to 'foreground service api calling screen'
- put app in background
- app is crashing by displaying above error
Expected behavior it is working fine in other os version mobiles except android 12 and api level > 31
Smartphone (please complete the following information):
- Device: Any Mobile device with android os 12
- OS: android os should be 12