I am using Google notifications in my app, and until now I have done below in the manifest: <!– GCM –> <uses-permission android:name=”android.permission.GET_ACCOUNTS” /> <!– GCM requires a Google account. –> <uses-permission android:name=”android.permission.WAKE_LOCK” /> <!– Keeps the processor from sleeping when a message is received. –> <uses-permission android:name=”” /> <!– This app has permission to … Read more

startForeground fail after upgrade to Android 8.1

After upgrading my phone to 8.1 Developer Preview my background service no longer starts up properly. In my long-running service I’ve implemented a startForeground method to start the ongoing notification which is called in on create. @TargetApi(Build.VERSION_CODES.O) private fun startForeground() { // Safe call, handled by compat lib. val notificationBuilder = NotificationCompat.Builder(this, DEFAULT_CHANNEL_ID) val notification … Read more