How do I create an Intent that opens the Call Log Activity?

十年热恋 提交于 2019-11-30 13:30:38

问题


I want to create an Intent that opens the screen showing the call logs of the current device?

How would I specify such an Intent?


回答1:


Barmaley lead me to the correct path I did it with setting the type to Calls.ContentType.

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

This intent should do the trick.




回答2:


Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("content://call_log/calls")); 


来源:https://stackoverflow.com/questions/4556392/how-do-i-create-an-intent-that-opens-the-call-log-activity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!