List of usage examples for android.os Build MODEL
String MODEL
To view the source code for android.os Build MODEL.
Click Source Link
From source file:Main.java
public static int getPortraitDegree() { int degree = PORTRAIT_DEGREE_90; if (TextUtils.equals("i700v", Build.MODEL) || TextUtils.equals("A862W", Build.MODEL)) { degree = PORTRAIT_DEGREE_270;//from w w w .j ava 2 s. c om } return degree; }
From source file:Main.java
public static String getModel() { return Build.MODEL; }
From source file:Main.java
/** * Retrieves the information(deviceId, sim serial number etc) of the device on which app is running * // w w w.j a va 2 s . c om * @return the deviceID, if no deviceID is available the Android build MODEL is returned. */ public static String getDeviceName() { final String deviceName; String manufacturer = "" + Build.MANUFACTURER; String model = Build.MODEL; if (model.startsWith(manufacturer)) { deviceName = model; } else { deviceName = manufacturer + " " + model; } return deviceName; }
From source file:Main.java
public static String getUniqueId() { String m_szDevIDShort = "35" + //we make this look like a valid IMEI Build.BOARD.length() % 10 + Build.BRAND.length() % 10 + Build.CPU_ABI.length() % 10 + Build.DEVICE.length() % 10 + Build.DISPLAY.length() % 10 + Build.HOST.length() % 10 + Build.ID.length() % 10 + Build.MANUFACTURER.length() % 10 + Build.MODEL.length() % 10 + Build.PRODUCT.length() % 10 + Build.TAGS.length() % 10 + Build.TYPE.length() % 10 + Build.USER.length() % 10;//from w w w. j ava 2 s .c o m return m_szDevIDShort; }
From source file:Main.java
public static boolean isEmulator(Context context) { try {//from ww w . j a va 2 s . c o m TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); String imei = tm.getDeviceId(); if (imei != null && imei.equals("000000000000000")) return true; return (Build.MODEL.equals("sdk")) || (Build.MODEL.equals("google_sdk")); } catch (Exception ioe) { return false; } }
From source file:Main.java
public static boolean isEmulator(Context context) { try {/*ww w . j a va 2s . co m*/ TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE); String imei = tm.getDeviceId(); if (imei != null && imei.equals("000000000000000")) { return true; } return (Build.MODEL.equals("sdk")) || (Build.MODEL.equals("google_sdk")); } catch (Exception ioe) { } return false; }
From source file:Main.java
public static boolean deviceInFpsBlacklisted() { List<String> blackListedModels = Arrays.asList(BLACKLISTED_FPS_MODELS); for (String blackModel : blackListedModels) { String model = Build.MODEL; if (!TextUtils.isEmpty(model) && model.contains(blackModel)) { return true; }/*from w w w . ja v a2 s . c o m*/ } return false; }
From source file:Main.java
public static boolean deviceInAecBlacklisted() { List<String> blackListedModels = Arrays.asList(BLACKLISTED_AEC_MODELS); for (String blackModel : blackListedModels) { String model = Build.MODEL; if (!TextUtils.isEmpty(model) && model.contains(blackModel)) { return true; }/*from w ww. j a v a 2 s. c o m*/ } return false; }
From source file:Main.java
public static void logDeviceInfo(String tag) { Log.d(tag,//from ww w . j a v a 2 s .c o m "Android SDK: " + Build.VERSION.SDK_INT + ", " + "Release: " + Build.VERSION.RELEASE + ", " + "Brand: " + Build.BRAND + ", " + "Device: " + Build.DEVICE + ", " + "Id: " + Build.ID + ", " + "Hardware: " + Build.HARDWARE + ", " + "Manufacturer: " + Build.MANUFACTURER + ", " + "Model: " + Build.MODEL + ", " + "Product: " + Build.PRODUCT); }
From source file:Main.java
/** Information about the current build, taken from system properties. */ public static void logDeviceInfo(String tag) { Log.d(tag,//from w w w . j a v a 2 s . c om "Android SDK: " + Build.VERSION.SDK_INT + ", " + "Release: " + Build.VERSION.RELEASE + ", " + "Brand: " + Build.BRAND + ", " + "Device: " + Build.DEVICE + ", " + "Id: " + Build.ID + ", " + "Hardware: " + Build.HARDWARE + ", " + "Manufacturer: " + Build.MANUFACTURER + ", " + "Model: " + Build.MODEL + ", " + "Product: " + Build.PRODUCT); }