Android 8.0 startForeground


startForeground fail after upgrade to Android 8.1 Android 8.0까지는 startForeground 에 notification 채널이 잡혀있지 않아도 표출되지 않고 그냥 지나갔었었다.

image

8.1부터는 채널이 없는 startforeground notification에 대하여 android.app.RemoteServiceException: Bad notification for startForeground: java.lang.RuntimeException: invalid channel for service notification

를 발생시키고 앱을 종료한다.

따라서 startforefound 노티에도 적절한 채널을 제공하거나, 제거해야한다.




© 2018. by jc01rho

Powered by aiden