我们可以在 Android Wear 2.0 中拨打任何号码吗? [英] Can we make calls to any number in Android Wear 2.0?

查看:18
本文介绍了我们可以在 Android Wear 2.0 中拨打任何号码吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发 Android Wear 应用程序,我正在开发一项功能,以便在紧急情况下拨打 911.我还没有看到Android Wear 2.0.

I'm developing Android Wear application where I'm working on a feature which facilitates in calling 911 in case of emergency. I haven't seen the android wear 2.0 yet.

我知道 2.0 中有互联网连接和 Google Play 商店可用,但我不知道我们是否也可以拨打 2.0 中的任何号码.有人可以回答我的问题.

I know there is internet connectivity and Google Play Store available in 2.0 but I have no information if we can also make calls to any number in 2.0. Can someone please answer my question.

推荐答案

是的,如果您拥有具有蜂窝功能的设备(例如 LG Watch Urbane 2nd Edition LTE)和 SIM 卡,您就可以拨打电话.

Yes, you can make phone calls if you have a device with cellular capabilities (e.g. the LG Watch Urbane 2nd Edition LTE) and a SIM card.

在代码中它可能看起来像这样:

In code it might look something like this:

 Uri number = Uri.parse("tel:" + phoneNumber);
 Intent callIntent = new Intent(Intent.ACTION_DIAL, number);
 startActivity(callIntent);

这不需要任何权限,因为它实际上并不是在拨打电话,只是在可穿戴设备上打开拨号器.据我所知,也应该可以在没有用户确认的情况下拨打电话,但这需要处理运行时权限.

This doesn't require any permissions since it's not actually placing the call, just opening the dialer on the wearable. As far as I know it should also be possible to make a phone call without user confirmation, but this requires handling runtime permissions.

这篇关于我们可以在 Android Wear 2.0 中拨打任何号码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆