Android O : PHONE_STATE broadcast limitation

后端 未结 6 1911
一整个雨季
一整个雨季 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:06

    As there is NO proper solution to read the PHONE_STATE from Android O. The best alternative we can go for is to trigger a job on new call log entry from the content provider. By this, the behaviour is maintained of showing a screen(with a few sec of delay) after the call ends.

    NOTE : The disadvantage is we cannot get the state of the phone call(Ringing or off_the_hook etc.,). The call back will only be received after the new call log has been added to the System DB.

提交回复
热议问题