简体   繁体   中英

Find the Missed call count in Android

Is there 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);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM