iOS Question Retrieving Carrier Name from iPhone programmatically

ykucuk

Well-Known Member
Licensed User
Longtime User
Hello,

How can i get Carrier Name from iPhone programmatically ?
 

Computersmith64

Well-Known Member
Licensed User
Longtime 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.
 
Upvote 0

ykucuk

Well-Known Member
Licensed User
Longtime 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
 
Upvote 0
Top