Skip to main content

Posts

Showing posts from November, 2012

Get device name,IMEI no,screen width,height and mobile no in Android

Hi friends,Today I'm going post about how to Get device name,IMEI no,screen width,height and mobile no.Few days ago I need to use this all in my recent project but could not seen any tutorial which explains about this all.So have look on code part it's pretty easy.Android provides us API for this all. Code: public class Utility {     int sh, sw;     Context context;     DisplayMetrics metrics;     public AdParameters(Context context) {         // TODO Auto-generated constructor stub         this.context = context;         metrics = context.getResources().getDisplayMetrics();     }     public String getDeviceName() {         return android.os.Build.MODEL;     }     public String getIMEI() {         // TODO Auto-generated method stub         TelephonyManager telephonyManager = (TelephonyManager) context                 .getSystemService(Context.TELEPHONY_SERVICE);         return telephonyManager.getDeviceId();         // return (