App Inventor Extensions


Telephony Manager Extension

See the App Inventor Extensions document about how to use an App Inventor Extension.

For questions about this extension or bug reports please start a new thread in the App Inventor Extensions forum. Thank you.

For feature requests please contact me by email. To be a sponsor of a new method already is possible starting from only 10 USD! With your contribution you will help the complete App Inventor community. Thank you.

Jan 30th, 2016: Version 1: initial version for App Inventor version ai2extensions6 and Companion version 235.cdk2.

Feb 10th, 2016: Version 2: CellId and LAC added.

Feb 13th, 2016: Version 3: SignalStrengthChanged event added.

Mar 07th, 2016: Version 4: SignalStrength properties added.

Apr 05th, 2016: Version 5: LTE for methods CellId and Lac added.

Aug 11th, 2016: Version 5a: avoid DX execution failed error: build each extension separately

Description

Extension to get some information from the telephony manager.
Required permission: android.permission.READ_PHONE_STATE
Thank you Niki Romagnoli for your snippet to provide country code from phone code and vice versa.
Required permissions: android.permission.READ_PHONE_STATE, android.permission.ACCESS_COARSE_LOCATION

Properties


Return the signal strength in asu.


Return the signal strength in dBm.

Methods


Returns the IMEI/MEID of the device.
If the device is a GSM device then IMEI will be returned and if the device is a CDMA device then MEID will be returned. In case of tablets or devices which can't act as Mobile Phone, IMEI will be null.


Return the device phone number (MSISDN).
In case of tablets or devices which can't act as Mobile Phone, phone number will be null.

Note: This is no guaranteed solution, because the phone number is not physically stored on all SIM-cards, or broadcasted from the network to the phone. This is especially true in some countries which requires physical address verification, with number assignment only happening afterwards. As workaround you always can use this solution.
Thank you Tanja for being the sponsor of this block!

Note: For dual SIM cards the preferred SIM details are returned. Thank you mannankhanabdul!


Return the registered network operator's two-chars country code. In case of tablets or devices which can't act as Mobile Phone, this will be null.


Return the MCC + MNC of the registered network operator. In case of tablets or devices which can't act as Mobile Phone, this will be null.


Return the registered network operator's name. In case of tablets or devices which can't act as Mobile Phone, this will be null.


Return the SIM operator's two-chars country ISO code. In case of tablets or devices which can't act as Mobile Phone, this will be null.


Return the SIM operator's MNC + MCC number. In case of tablets or devices which can't act as Mobile Phone, this will be null.


Return the SIM Serial Number. In case of tablets or devices which can't act as Mobile Phone, this will be null.


Get phone code from two-chars country ISO code. For example country=US provides 1, country=IT provides 39. The country ISO code will automatically be converted into upper case.
Thank you Tanja for being the sponsor of this block!


Get list of two-chars country ISO codes from phone code. Several countries may match the same code.


Return the base station cell id. In case the cell location is not available, 0 will be returned. For LTE, Android version must be min. Android 4.2 (API 17). The information provided is carrier dependent.
Note: This block needs the permission android.permission.ACCESS_COARSE_LOCATION.
Thank you Seo for being the sponsor of this block!
Thank you Jose Juan for being the sponsor of the LTE enhancement of this block

Note: this method does not work for CDMA. Thank you qiutong ye.


Return the base station LAC. In case the cell location is not available, 0 will be returned. For LTE the Tracking Area Code will be provided, Android version must be min. Android 4.2 (API 17). The information provided is carrier dependent.
Note: This block needs the permission android.permission.ACCESS_COARSE_LOCATION.
Thank you Jose Juan for being the sponsor of the LTE enhancement of this block

Note: this method does not work for CDMA. Thank you qiutong ye.

Events


Event indicating that signal strength has changed. Signal strength is provided in dBm and asu.

Example Use

Example Use: Signal Strength

Do you need help with your App Inventor project?

I can help you: for one hour I charge 25 USD.
Please contact me at info [at] puravidaapps [dot] com for details!
For questions about App Inventor, please use the App Inventor forum. Thank you.

Terms and Conditions

Download


If you find this example helpful and you are using it in one of your projects,
be nice and donate a small amount!

Donation amount:

or donate some mBTC to Bitcoin Address:
1Jd8kXLHu2Vkuhi15TWHiQm4uE9AGPYxi8
Bitcoin

Thank you! Taifun
 

Download TaifunTM extension (aix file)

Download Telephony Manager Test (aia file)
Download Signal Strength Test (aia file)

Back to top of page ...

Creative Commons License
This work by Pura Vida Apps is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License
with attribution (name=Pura Vida Apps and link to the source site) required.


Home | Snippets | Tutorials | Extensions | News | Forums | Links | Search | Contact