Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Development

Posts: 15
Registered: ‎03-10-2010
My Device: Q10,Z10
My Carrier: Telus
Accepted Solution

retrieving phone number

TelephonyManager mTelephonyMgr = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);

String num = mTelephonyMgr.getLine1Number();


the num turns out to be null, I even used debugger to probe every value within mTelephonyMgr, but none of them seems to contain the phone number, anyone know if it is possible to retrieve the phone number?  thanks


any comments are appreicated.

BlackBerry Development Advisor
Posts: 102
Registered: ‎11-21-2008
My Device: Z10
My Carrier: Bell

Re: retrieving phone number

Hi yuusaku,


Thanks for dropping by the forums!


Retreiving the phone number via the TelephonyManager class would not be supported within the BlackBerry Runtime for Android apps per the documentation provided at:  https://developer.blackberry.com/android/apisupport/unsupportedapi_blackberry10_hardware_features.ht...



James Dreher
BlackBerry Development Advisor