您的位置:首页 > 其它

获取手机设备型号,厂商,手机版本,IMEI等信息

2015-08-14 14:43 676 查看
获取手机设备型号,厂商,手机版本,IMEI等信息

import android.content.Context;
import android.telephony.TelephonyManager;

public class StaticStatus {
/**
* The device's OS version.
*/
public static String ANDROID_VERSION  = null;

/**
* The device's model name.
*/
public static String PHONE_MODEL = null;

/**
* The device's model manufacturer name.
*/
public static String PHONE_MANUFACTURER = null;

/**
* The device's IMEI.
*/
public static String PHONE_IMEI = null;

public static String getDeviceVersion(){
StaticStatus.ANDROID_VERSION = android.os.Build.VERSION.RELEASE;
return StaticStatus.ANDROID_VERSION;
}
public static String getDeviceModel(){
StaticStatus.PHONE_MODEL = android.os.Build.MODEL;
return StaticStatus.PHONE_MODEL;
}
public static String getDeviceManufacture(){
StaticStatus.PHONE_MANUFACTURER = android.os.Build.MANUFACTURER;
return StaticStatus.PHONE_MANUFACTURER;
}
public static String getDeviceIMEI(Context context){
TelephonyManager telephonyManager= (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
StaticStatus.PHONE_IMEI = telephonyManager.getDeviceId();
return StaticStatus.PHONE_IMEI;
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  手机 imei