Receiver stopped receiving in Oreo

前端 未结 2 1103
無奈伤痛
無奈伤痛 2021-01-01 06:43

I understand services and such are being clamped down on, so my receiver has stopped working in Android Oreo.

I have this code starting the service -



        
2条回答
  •  悲&欢浪女
    2021-01-01 07:01

    Since Android Oreo, receivers must be registered in runtime using context.registerReceiver(receiver, intentFilter); to receive implicit intents

    You can still receive explicit intents and some special implicit actions, as boot_completed or locale_changed for example

    More information at https://developer.android.com/about/versions/oreo/background.html#broadcasts

提交回复
热议问题