开发者

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

开发者 https://www.devze.com 2023-02-01 10:28 出处:网络
I want to create an Intent that opens the screen showing the call logs of the current device? How would I specify such an In开发者_Python百科tent?Barmaley lead me to the correct path I did it with s

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

How would I specify such an In开发者_Python百科tent?


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.


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

精彩评论

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

关注公众号