确定设备是否可以同时调用和传输数据

发布于 2024-12-18 17:42:31 字数 404 浏览 1 评论 0原文

我的 iPhone 应用程序需要拨打电话号码并将一些数据发送到远程服务器。

重要的是我:

  1. 触发呼叫,然后
  2. 设置一个后台任务来与我的服务器通信

我一直在使用 AT&T 电话进行开发/测试,在打电话时在后台发送数据没有问题已启动。

但是,Verizon 客户无法拨打电话和传输数据,因此对于他们来说,我想颠倒我的操作顺序。

确定我需要走哪条路线的最佳方法是什么?我见过查看 iPhone 型号的示例,如果是 3.3,则意味着它是 Verizon,因此我可以从那里继续,但这似乎不可靠或面向未来。 Verizon 是目前唯一有此限制的运营商吗?似乎应该有某种属性,例如 -[UIDevice isMultiTaskingSupported]

My iPhone application needs to dial a phone number and send some data to a remote server.

It's important that I:

  1. Trigger the call, and then
  2. set up a background task that will communicate with my server

I've been developing/testing with an AT&T phone, which has no problem sending the data in the background while a phone call is initiated.

However, Verizon customers don't have the ability to call and stream data, so for them, I'd like to reverse my order of operations.

What's the best way to determine which route I need to take? I've seen examples of looking at the iPhone's model number, and if it's 3.3, it means it's Verizon so I can proceed from there, but that doesn't seem robust or future proof. Is Verizon the only carrier that currently has this limitation? Seems like there should be some sort of property like -[UIDevice isMultiTaskingSupported].

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

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

发布评论

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

评论(1

微暖i 2024-12-25 17:42:32

没有像您提到的 UIDevice 方法那样出色的单行代码,但是有 核心电话框架。我自己没有使用过它,但似乎你可以使用 CTCarrier 类来找出这一点,特别是 <代码>mobileNetworkCode 属性。 此列表应该可以帮助您入门。从表面上看,对于某些运营商,您可以使用此代码来确定您是否处于 EDGE 状态。对于 CDMA 或 EDGE 网络,对于同时传输语音和数据流,答案是否定的,但对于非 EDGE 的 GSM 网络,则可以。您也可以只使用 carrierName 属性并查找“AT&T”,但这并不考虑 EDGE。

好的解决方案吗?可能不会。

There’s no great one-liner like the UIDevice method you mentioned, but there is the Core Telephony framework. I haven’t used it myself, but it seems like you could use the CTCarrier class to find this out, specifically the mobileNetworkCode property. This list should get you started. From the look of it, for some carriers, you can use this code to determine if you’re on EDGE or not. For CDMA or EDGE networks, the answer will be “no” for simultaneously streaming voice and data, but for GSM networks that aren’t EDGE, you’re good. You could also just use the carrierName property and look for “AT&T,” but that doesn’t account for EDGE.

Is there a good solution? Probably not.

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