当设备进入打盹模式或省电模式时,我的 PhoneStateListener 停止工作。我还需要在设备重启时注册 PhoneStateListener。我不想使用 BroadcastReceiver,因为不再推荐它,请参阅https://developer.android.com/about/versions/oreo/background#broadcasts
jeck猫
相关分类