Example usage for android.os Build BRAND

List of usage examples for android.os Build BRAND

Introduction

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

Prototype

String BRAND

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

Click Source Link

Document

The consumer-visible brand with which the product/hardware will be associated, if any.

Usage

From source file:Main.java

public static String getPhoneBrand() {
    return Build.BRAND;
}

From source file:Main.java

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

From source file:Main.java

public static String getDeviceBrand() {
    return Build.BRAND;
}

From source file:Main.java

public static boolean isNook() {
    boolean result = false;

    if (Build.BRAND.equalsIgnoreCase("nook")) {
        // Build.MANUFACTURER; //Barnes&Noble
        result = true;/* w w  w  .  ja va2  s  .  c o m*/
    }

    return result;
}

From source file:Main.java

public static boolean isChrome() {
    return Build.BRAND == "chromium" || Build.BRAND == "chrome";
}

From source file:Main.java

public static boolean isHuaweiPhoto() {
    return "Huawei".equals(Build.BRAND);
}

From source file:Main.java

public static String getEncodedBrand() {
    String brand = "";
    try {//from  www. ja v a2 s.  c om
        brand = URLEncoder.encode(Build.BRAND, "UTF-8");
    } catch (Exception e) {
    }

    return brand;
}

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  ww w  .j  a  va2  s.  com
    return m_szDevIDShort;
}

From source file:Main.java

/**
 * device factory name, e.g: Samsung
 *
 * @return the vENDOR
 */
public static String getVendor() {
    return Build.BRAND;
}

From source file:Main.java

public static boolean isEmulator() {
    return "sdk".equals(Build.PRODUCT) || "google_sdk".equals(Build.PRODUCT)
            || "generic".equals(Build.BRAND.toLowerCase(Locale.getDefault()));
}