iOS Question Retrieving Carrier Name from iPhone programmatically

Computersmith64

Well-Known Member
Licensed User
There is a framework available (CoreTelephony) that provides that information, however I don't think it has been implemented in B4i. There is an example here -> How to read missed calls or check phone state? on how to use CoreTelephony with inline Java, so that might point you in the right direction.

- Colin.
 

ykucuk

Well-Known Member
Licensed User
Untested 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)
it works
 
Top