import CoreTelephony
static var carrierName:String? {
let networkInfo = CTTelephonyNetworkInfo()
let carrier = networkInfo.subscriberCellularProvider
return carrier?.carrierName
}
Dim netinfo As NativeObject
netinfo = netinfo.Initialize("CTTelephonyNetworkInfo").RunMethod("new", null)
Dim carrier As nativeObject = netinfo.RunMethod("subscriberCellularProvider", Null)
Log(carrier.RunMethod("carrierName", Null).AsString)
it worksUntested code:
B4X:Dim netinfo As NativeObject netinfo = netinfo.Initialize("CTTelephonyNetworkInfo").RunMethod("new", null) Dim carrier As nativeObject = netinfo.RunMethod("subscriberCellularProvider", Null) Log(carrier.RunMethod("carrierName", Null).AsString)