How to insert photo in call intent?

2019-08-06 02:46发布

If I use the Android Phone app to call, the app shows a photo from the contact that I am calling.

But, if I use an intent to call the Phone app (below code), there is no photo.

Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:1234567890"));
startActivity(callIntent);

How do I show the contact's photo when calling?

Thanks!

1条回答
闹够了就滚
2楼-- · 2019-08-06 02:54

http://developer.android.com/reference/android/content/Intent.html#ACTION_DIAL

I'm assuming you need to pass the Uri of a phone number, and not an explicit phone number.

ACTION_DIAL content://contacts/people/1 -- Display the phone dialer with the person filled in.

查看更多
登录 后发表回答