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

后端 未结 2 1940
故里飘歌
故里飘歌 2020-12-30 12:37

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?

2条回答
  •  臣服心动
    2020-12-30 13:10

    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.

提交回复
热议问题