Permission Denial: startForeground requires android.permission.FOREGROUND_SERVICE
This will happen if you have set targetSdkVersion = 28 (Android 9 / Pie) or above and have not declared the usage of the FOREGROUND_SERVICE permission. From the migration notes for Android 9: Apps wanting to use foreground services must now request the FOREGROUND_SERVICE permission first. This is a normal permission, so the system automatically … Read more