Determine if the device can call and transmit data at the same time.

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

It is important that I:

  • Launch a call and then
  • set up a background task that will communicate with my server.

I developed / tested using an AT & T phone, in which there is no problem sending data in the background when initiating a phone call.

However, Verizon customers are not able to call and transmit data, so for them I would like to change the order of operations.

What is the best way to determine which route I need to take? I saw examples of viewing the iPhone model number, and if it's 3.3, it means that it is Verizon, so I can go from there, but it does not seem reliable or future proof. Is Verizon the only carrier that currently has this limitation? It looks like there should be some kind of property like -[UIDevice isMultiTaskingSupported] .

+4
source share
1 answer

There is no such great one-line dialing as the UIDevice method you mentioned, but there is basic telephony . I did not use it myself, but it looks like you could use the CTCarrier class to find out about this, in particular, mobileNetworkCode . This list should start you. In appearance, for some operators, you can use this code to determine if you are on EDGE or not. For CDMA or EDGE networks, the answer is no for simultaneous voice and data transmission, but for GSM networks that do not have EDGE, you are good. You can also just use the carrierName property and search for "AT & T", but that doesn't take EDGE into account.

Is there a good solution? Probably not.

+1
source

Source: https://habr.com/ru/post/1383547/


All Articles