Example usage for android.os Build MODEL

List of usage examples for android.os Build MODEL

Introduction

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

Prototype

String MODEL

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

Click Source Link

Document

The end-user-visible name for the end product.

Usage

From source file:Main.java

public static String getPid() {
    StringBuilder pid = new StringBuilder(Build.MANUFACTURER).append(" ").append(Build.MODEL).append(" - ")
            .append(Build.VERSION.RELEASE);

    return pid.toString();
}

From source file:Main.java

public static String getDeviceName() {
    String manufacturer = Build.MANUFACTURER;
    String model = Build.MODEL;
    if (model.startsWith(manufacturer)) {
        return model.toUpperCase();
    } else {/*from w w  w.ja v a  2 s.  c  o m*/
        return manufacturer + " " + model;
    }
}

From source file:Main.java

static public String getDeviceName() {
    String manufacturer = Build.MANUFACTURER;
    String model = Build.MODEL;
    if (model.startsWith(manufacturer)) {
        return capitalize(model);
    } else {/*from   w  ww  .  ja v a2s . co  m*/
        return capitalize(manufacturer) + " " + model;
    }
}

From source file:Main.java

public static String getDeviceName() {
    String manufacturer = Build.MANUFACTURER;
    String model = Build.MODEL;
    if (model.startsWith(manufacturer)) {
        return capitalize(model);
    } else {/*www  . ja v  a  2s.co  m*/
        return capitalize(manufacturer) + " " + model;
    }
}

From source file:Main.java

public static String getDeviceModelName() {
    String manufacturer = Build.MANUFACTURER;
    String model = Build.MODEL;
    if (model.startsWith(manufacturer)) {
        return capitalize(model);
    } else {//from  w  w w  .  j  a  v  a 2 s  .  c  o  m
        return capitalize(manufacturer) + " " + model;
    }
}

From source file:Main.java

public static String getCurrentDeviceFullModel() {
    String deviceFullModel = "";
    if (Build.MANUFACTURER == null || Build.MODEL == null)
        return deviceFullModel;
    deviceFullModel = Build.MANUFACTURER + "(" + Build.MODEL + ")";
    return deviceFullModel;
}

From source file:Main.java

/**
 * Build.MODEL + ":" + Build.PRODUCT//from w w w. j  ava 2s .c  o m
 *
 * @return
 */
public static String getPhoneModel() {
    return Build.MODEL + ":" + Build.PRODUCT;
}

From source file:Main.java

/**
 */
public static String getBuildModel() {

    return Build.MANUFACTURER + Build.MODEL;
}

From source file:Main.java

public static String getDeviceModel() {
    String model = Build.MODEL;
    if (TextUtils.isEmpty(model)) {
        return "unknown";
    }// ww  w .  ja v  a 2 s  .c  om
    return model;
}

From source file:Main.java

/**
 * Identifies if the device is manufactured by HTC
 *///  ww w .  j a  v  a2 s  .com
private static boolean isHtc() {
    return Build.MODEL != null && Build.MODEL.toLowerCase(Locale.US).contains("htc");
}