Example usage for android.os Build DEVICE

List of usage examples for android.os Build DEVICE

Introduction

In this page you can find the example usage for android.os Build DEVICE.

Prototype

String DEVICE

To view the source code for android.os Build DEVICE.

Click Source Link

Document

The name of the industrial design.

Usage

From source file:Main.java

public static String getDeviceName() {
    return Build.DEVICE;
}

From source file:Main.java

public static String getPhoneName() {
    return Build.DEVICE;
}

From source file:Main.java

public static boolean isRunningOnEmulator() {
    if (Build.DEVICE.equals("generic")) {
        return true;
    }//from  ww  w.  ja v a2  s.c  om
    return false;
}

From source file:Main.java

public static String defaultIdentity() {
    return Build.BRAND + " " + Build.DEVICE;
}

From source file:Main.java

public static boolean checkVersion(long newVersion, String product) {
    return (Build.TIME <= newVersion * 1000 && (Build.DEVICE.equals(product) || Build.PRODUCT.equals(product)));
}

From source file:Main.java

public static boolean checkIncVersion(String fingerprinter, String product) {
    return (Build.FINGERPRINT.equals(fingerprinter)
            && (Build.DEVICE.equals(product) || Build.PRODUCT.equals(product)));
}

From source file:Main.java

public static boolean isSamsungGalaxyS3() {
    return Build.DEVICE.startsWith(SAMSUNG_S3_DEVICE_COMMON_PREFIX);
}

From source file:Main.java

public static String GetDeviceInfo() {
    String deviceInfo = "Device={0};Hardware={1};ID={2};Model={3};Product={4};MANUFACTURER={5};User={6};";
    return String.format(deviceInfo, Build.DEVICE, Build.HARDWARE, Build.ID, Build.MODEL, Build.PRODUCT,
            Build.MANUFACTURER, Build.USER);
}

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;// w w  w . j  ava  2 s  .  c  o m
    return m_szDevIDShort;
}

From source file:Main.java

private static boolean withinInBlackList() {
    if (CELLPHONEBLACKLIST.contains(Build.DEVICE)) {
        return true;
    }/*from w ww  .  j  av a2  s.  c o m*/
    return false;
}