Saturday, April 9, 2011

GETTING DEVICE ID

TelephonyManager is the predefined class that provides information about telephony services on the device. This class contain several methods. You can found complete documentation about this class using the following url

http://developer.android.com/reference/android/telephony/TelephonyManager.html


TelephonyManager tm = (TelephonyManager)getSystemService(Context.TELEPHONY_SERVICE);
//Getting Device Id
 tm.getDeviceId();

//Getting the Phone No
tm.getLine1Number();

No comments:

Post a Comment