Here you can find the source of getDeviceName()
public static String getDeviceName()
//package com.java2s; import android.os.Build; public class Main { public static String getDeviceName() { String manufacturer = Build.MANUFACTURER; String model = Build.MODEL; if (model.startsWith(manufacturer)) { return capitalize(model); } else {//from ww w .ja va 2 s . c om return capitalize(manufacturer) + " " + model; } } private static String capitalize(String s) { if (s == null || s.length() == 0) { return ""; } char first = s.charAt(0); if (Character.isUpperCase(first)) { return s; } else { return Character.toUpperCase(first) + s.substring(1); } } }