Java Question getIstance in B4A

MarcoRome

Expert
Licensed User
Longtime User
i know example that this:
B4X:
TelephonyManager telMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
in B4A is:
B4X:
telephonyManager = (TelephonyManager) ba.applicationContext.getSystemService(ba.applicationContext.TELEPHONY_SERVICE);

but if i have this in java code:
B4X:
telephonyInfo = TelephonyInfo.getInstance(this);

this code in B4A is... ??
:confused:

Thank you all
 

MarcoRome

Expert
Licensed User
Longtime User
i know example that this:
B4X:
TelephonyManager telMgr = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
in B4A is:
B4X:
telephonyManager = (TelephonyManager) ba.applicationContext.getSystemService(ba.applicationContext.TELEPHONY_SERVICE);

but if i have this in java code:
B4X:
telephonyInfo = TelephonyInfo.getInstance(this);

this code in B4A is... ??
:confused:

Thank you all
Resolve:
B4X:
telephonyInfo = TelephonyInfo.getInstance(ba.context);

Thank you anyway ;)
 
Top