How to insert photo in call intent?

青春壹個敷衍的年華 提交于 2019-12-14 02:27:45

问题


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:


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.



来源:https://stackoverflow.com/questions/7215615/how-to-insert-photo-in-call-intent

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