Returns the consumer friendly device name - Android Hardware

Android examples for Hardware:Device Name

Description

Returns the consumer friendly device name

Demo Code

import android.os.Build;

public class Main {
  /** Returns the consumer friendly device name */
  public static String getDeviceName() {
    String manufacturer = Build.MANUFACTURER;
    String model = Build.MODEL;/*from w ww  . j  a va 2s. c o m*/
    if (model.startsWith(manufacturer)) {
      return model;
    }
    return manufacturer + " " + model;
  }
}

Related Tutorials