Saturday, April 9, 2011

HIDING THE TITLE BAR THROUGHOUT APPLICATION

  To hide the title bar through out application we have to include android:theme attribute to application tag in the Andriod Manifast.xml

 <application android:name="TestApplication" android:theme="@android:style/Theme.NoTitleBar">


Then in entire application title bar was not visible.

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();