Hello,
I'm testing an app using Firebase Cloud Services on Android 9 and getting the follow error:
java.lang.RuntimeException: Unable to start service com.comten.nexphone.firebasemessaging@f3fffa5 with Intent { cmp=com.comten.nexphone/.firebasemessaging (has extras) }: java.lang.RuntimeException: java.lang.SecurityException: Permission Denial: startForeground from pid=12936, uid=10085 requires android.permission.FOREGROUND_SERVICE
The same app is running well in Android 8 (sdk 27). Is there any special permission to require in Android 9? I noticed that this error occurs only when the app is minimized what means that there is something blocking the Firebase service to start when the app in in foreground...
Any ideas?
I'm testing an app using Firebase Cloud Services on Android 9 and getting the follow error:
java.lang.RuntimeException: Unable to start service com.comten.nexphone.firebasemessaging@f3fffa5 with Intent { cmp=com.comten.nexphone/.firebasemessaging (has extras) }: java.lang.RuntimeException: java.lang.SecurityException: Permission Denial: startForeground from pid=12936, uid=10085 requires android.permission.FOREGROUND_SERVICE
The same app is running well in Android 8 (sdk 27). Is there any special permission to require in Android 9? I noticed that this error occurs only when the app is minimized what means that there is something blocking the Firebase service to start when the app in in foreground...
Any ideas?