开发者

Find the Missed call count in Android

开发者 https://www.devze.com 2023-03-30 02:34 出处:网络
Is there开发者_JAVA技巧 a way to find the missed call count in Android. I used call Log and I am able to get the total number of missed calls in the call log but not the missed calls after the last ti

Is there开发者_JAVA技巧 a way to find the missed call count in Android. I used call Log and I am able to get the total number of missed calls in the call log but not the missed calls after the last time the user visited the call log.

For eg the user has 1 missed call then it will be displayed in notification bar but when user visits the call log then this count is cleared and from next time the notification is not displayed until there is a new missed call. I would like to simulate the same behavior.

Thanks, Prabhu


you should store the previous missed call count in sharedPreference ...

you can invoke native call log screen and from here you can get the notification that the call log has been visited:

Intent showCallLog = new Intent();
showCallLog.setAction(Intent.ACTION_VIEW);
showCallLog.setType(CallLog.Calls.CONTENT_TYPE);
context.startActivity(showCallLog);
0

精彩评论

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