4

I need to get the current Service Status for the radio signal. I would like to be able to know if it is in one of the next different states ["in_service", "out_of_service", "emergency_only"].

Something similar as ServiceState from the class TelephonyManager in Android

I've been researching about that and I know that I can get the network and cell technology:

let radioAccessTechnology = telefonyInfo.serviceCurrentRadioAccessTechnology

switch x{
   case CTRadioAccessTechnologyGPRS:
        network = "GPRS"
        cell = "GSM"
   case CTRadioAccessTechnologyEdge:
        network = "EDGE"
        cell = "GSM"
   case CTRadioAccessTechnologyHSDPA:
        network = "HSDPA"
        cell = "UMTS"
   case CTRadioAccessTechnologyHSUPA:
        network = "HSUPA"
        cell = "UMTS"
   case CTRadioAccessTechnologyWCDMA:
        network = "UMTS"
        cell = "UMTS"
   case CTRadioAccessTechnologyLTE:
        network = "LTE"
        cell = "LTE"
   default:
        network = "unknown"
        cell = "unknown"
}

However, I couldn't find how to define the service status, maybe it is posible combining the previous code and something else, but I'm quite lost about it.

I would really appreciate some kind of information about this, even tinny clues which I could use to research with.

CPI
  • 786
  • 1
  • 5
  • 18

0 Answers0