TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); String deviceid=tm.getDeviceId();