在应用程序中拨打电话而不重定向到电话活动

发布于 2024-10-31 11:08:30 字数 287 浏览 4 评论 0 原文

我想知道是否有任何方法可以在 Android 中拨打电话而不将 uri 重定向到电话活动。要拨打电话,

String uri2 = "tel:678-547-9181";
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse(uri2));
startActivity(intent);

这是我之前使用的代码。但这会重定向到电话活动并拨打电话。但我不想向用户透露电话号码。有什么办法可以做到这一点吗?

I want to know if there is any method to make a phone call in Android without redirecting the uri to Phone Activity. To make a phone call,

String uri2 = "tel:678-547-9181";
Intent intent = new Intent(Intent.ACTION_CALL);
intent.setData(Uri.parse(uri2));
startActivity(intent);

This was the code i was using earlier. But this redirects to phone activity and makes a call. But i dont want to reveal the phone number to the user. Is there any way that i can do this?

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

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

发布评论

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

评论(1

风和你 2024-11-07 11:08:30

抱歉,SDK 应用程序无法做到这一点。

That is not possible from an SDK application, sorry.

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