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 getHardware() {
    return Build.MANUFACTURER.toLowerCase(Locale.getDefault()) + ' '
            + Build.MODEL.toLowerCase(Locale.getDefault());
}

From source file:Main.java

public static boolean isMiui() {
    boolean bool = false;
    if ((Build.MANUFACTURER.contains("MIUI")) || (Build.ID.contains("MIUI")) || (Build.MODEL.contains("MIUI"))
            || (Build.MODEL.startsWith("MI-ONE"))) {
        bool = true;// w ww  .j ava2  s.  c  om
    }
    return bool;
}

From source file:Main.java

public static String getDeviceName() {
    String manufacturer = Build.MANUFACTURER;
    String model = Build.MODEL;
    return model.startsWith(manufacturer) ? model : manufacturer + " " + model;
}

From source file:Main.java

public static String getDeviceType(Context context) {
    String phoneString = Build.MODEL;
    return phoneString;
}

From source file:Main.java

public static String getEncodedPhoneModel() {
    String model = "";
    try {/*  www  .j  av  a2 s.  com*/
        model = URLEncoder.encode(Build.MODEL, "UTF-8");
    } catch (Exception e) {
    }

    return model;
}

From source file:Main.java

public static String getDeviceModel(Context ctxt) {
    String manufacturer = Build.MANUFACTURER;
    String model = Build.MODEL;
    if (model.startsWith(manufacturer)) {
        return model;
    } else {//  ww w . jav  a2 s .c o  m
        return manufacturer + " " + model;
    }
}

From source file:Main.java

/** Returns the consumer friendly device name */
public static String getDeviceName() {
    String manufacturer = Build.MANUFACTURER;
    String model = Build.MODEL;

    return manufacturer + " " + model;
}

From source file:Main.java

public static String getDeviceName() {
    String manufacturer = Build.MANUFACTURER;
    String model = Build.MODEL;

    if (model.startsWith(manufacturer))
        return (capitial(model));
    else// w w w.  j  ava  2s .  c o m
        return capitial(manufacturer) + "" + model;
}

From source file:Main.java

/**
 * //from  w  w  w.  j  av  a2 s  .  c om
 * @return True if we are running on the emulator
 */
public static boolean isEmulator() {
    return Build.MODEL.equals("google_sdk");
}

From source file:Main.java

public static String getDeviceName() {
    String manufacturer = Build.MANUFACTURER;
    String model = Build.MODEL;
    if (model.startsWith(manufacturer)) {
        return capitalize(model);
    }//w ww.j  a  v  a  2s.co  m
    if (manufacturer.equalsIgnoreCase("HTC")) {
        return "HTC " + model;
    }
    return capitalize(manufacturer) + " " + model;
}