-2

我需要使用 Zebble 在 ios、android 和 windows 手机平台上启动电话拨号器,如下图所示。

拨号盘

我写了一些代码来运行拨号盘,但在 Zebble 中,我无法访问活动来启动。

public async Task DialNumber()
{
    if(Device.Platform == DevicePlatform.Android)
    {
        var intent = new Intent(Intent.ActionDial,Android.Net.Uri.Parse("tel:111111"));
        StartActivity(intent);
    }
}
4

1 回答 1

0

要使用 Zebble 进行调用,您可以使用此 API

public async Task DialNumber()
{
    await Device.Messaging.PhoneCall("111111", null, OnError.Toast);
}

要了解有关 zebble API 的更多信息,请访问http://zebble.net/docs/device-messaging-make-a-phone-call-send-sms-or-email网站。

免责声明:我是 Zebble 项目的贡献者并从事技术支持。

于 2017-05-11T06:04:30.727 回答