react-native-background-worker icon indicating copy to clipboard operation
react-native-background-worker copied to clipboard

android.app.ForegroundServiceStartNotAllowedException: startForegroundService() not allowed due to mAllowStartForeground

Open vinodkuumar opened this issue 2 years ago • 0 comments

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:

  1. Go to 'foreground service api calling screen'
  2. put app in background
  3. 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

vinodkuumar avatar Jun 28 '22 10:06 vinodkuumar