开发者

Remove last call from Call Log OR keep it from being stored on Android

开发者 https://www.devze.com 2023-03-20 21:05 出处:网络
Things are simple, with a Broadcast receiver I intercept the phone call. Because calling broadcast can\'t be aborted, the InCallScreen appears and the call get\'s stored in Call Log. I manged somehow

Things are simple, with a Broadcast receiver I intercept the phone call. Because calling broadcast can't be aborted, the InCallScreen appears and the call get's stored in Call Log. I manged somehow to block the InCallScreen from appearing now I need to do something about the call lo开发者_如何学运维g. So, I've got the phone number and the date of the call. How do I delete it from the Call log ? If I get the list of items from the Call Log uri, my call will always be the first in that list ?


The simplest solution was to start a service in the broadcast receiver, after the call state becomes ide. This service will have a sleep time of 5 seconds, time needed to make sure Android inserted the call into call log, and just then query the call log to get info about all calls.

0

精彩评论

暂无评论...
验证码 换一张
取 消