如何在通话意图中插入照片?

发布于 2024-12-01 14:42:17 字数 284 浏览 4 评论 0原文

如果我使用 Android 手机应用程序进行呼叫,该应用程序会显示我正在呼叫的联系人的照片。

但是,如果我使用意图调用电话应用程序(下面的代码),则没有照片。

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

打电话时如何显示联系人的照片?

谢谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

柒七 2024-12-08 14:42:17

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

我假设您需要传递电话号码的 Uri,而不是明确的电话号码。

ACTION_DIAL content://contacts/people/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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文