Broadcast Receiver not working when registered via manifest

前端 未结 1 1545
梦如初夏
梦如初夏 2020-12-21 07:17

Trying to setup a simple broadcast receiver in the manifest of an Android app, to detect when the phone is ringing and start a service. Its not receiving the broadcast when

1条回答
  •  余生分开走
    2020-12-21 07:59

    Incoming call broadcast receiver not working (Android 4.1) they said that as of android 4.1 the system no longer sends broadcasts to app components without an activity...is this true?

    That has been the case since Android 3.1. Something must explicitly run one of your components before your manifest-registered BroadcastReceivers will work, and the typical solution for this is to have an activity (the same one that provides app configuration, help, license agreements, etc.) that the user launches.

    Please read the Android 3.1 release notes for more.

    0 讨论(0)
提交回复
热议问题