Android O : PHONE_STATE broadcast limitation

后端 未结 6 1980
一整个雨季
一整个雨季 2021-02-06 22:12

I have been trying to do something similar to truecaller app, where my app is supposed to show a screen after a call gets hung up. Was achieving this by registering androi

6条回答
  •  無奈伤痛
    2021-02-06 23:09

    Eventually, the action was added to the "Implicit Broadcast Exceptions" list so you can add ACTION_PHONE_STATE_CHANGED to your manifest and it will work:

    https://developer.android.com/guide/components/broadcast-exceptions

    ACTION_CARRIER_CONFIG_CHANGED, TelephonyIntents.ACTION_*_SUBSCRIPTION_CHANGED, "TelephonyIntents.SECRET_CODE_ACTION", ACTION_PHONE_STATE_CHANGED, ACTION_PHONE_ACCOUNT_REGISTERED, ACTION_PHONE_ACCOUNT_UNREGISTERED

    OEM telephony apps may need to receive these broadcasts.

提交回复
热议问题