getNetworkOperator in Relector

synasir

Member
Licensed User
getNetworkOperator in Reflector

Hi all,
I need to get the MNC and MCC from the android phone. The only way I see is using the getNetworkOperator command in TelephonyManager class. How do I implement this using the reflector library. Thanks.
 
Last edited:

synasir

Member
Licensed User
Here:
B4X:
Sub Activity_Create(FirstTime As Boolean)
   Log(GetNetworkOperator)
End Sub
Sub GetNetworkOperator As String
   Dim r As Reflector
   r.Target = r.GetContext
   r.Target = r.RunMethod2("getSystemService", "phone", "java.lang.String")
   Return r.RunMethod("getNetworkOperator")
End Sub


Thanks. It works. It solved a whole load of problem for me. Thanks again. :sign0060:
 
Upvote 0
Top