Closed NathanKun closed 5 years ago
I've got a 'java.lang.SecurityException: Permission Denial: startForeground' when launching the app on my Pixel 2 XL Android 9.
Since Android9 Apps wanting to use foreground services must now request the FOREGROUND_SERVICE permission first. This is a normal permission, so the system automatically grants it to the requesting app. Starting a foreground service without the permission throws a SecurityException.
So I added the permission and the app works now.
Thanks
I've got a 'java.lang.SecurityException: Permission Denial: startForeground' when launching the app on my Pixel 2 XL Android 9.
Since Android9 Apps wanting to use foreground services must now request the FOREGROUND_SERVICE permission first. This is a normal permission, so the system automatically grants it to the requesting app. Starting a foreground service without the permission throws a SecurityException.
So I added the permission and the app works now.