Android examples for android.os:Build
get Mobile Info from all fields in android.os.Build class
import java.lang.reflect.Field; import android.os.Build; public class Main { public static String getMobileInfo() { StringBuffer sb = new StringBuffer(); try {/*from w ww. j av a 2s. c o m*/ Field[] fields = Build.class.getDeclaredFields(); for (Field field : fields) { field.setAccessible(true); String name = field.getName(); String value = field.get(null).toString(); sb.append(name + "=" + value); sb.append("\n"); } } catch (Exception e) { e.printStackTrace(); } return sb.toString(); } }