Android examples for android.os:SystemProperties
get System Serial Number
//package com.java2s; import java.lang.reflect.Method; public class Main { public static String getSerialNumber() { String serialNumber = ""; try {/*from w w w. ja v a2s .c o m*/ Class<?> c = Class.forName("android.os.SystemProperties"); Method get = c.getMethod("get", String.class); serialNumber = (String) get.invoke(c, "ro.serialno"); if (serialNumber.equals("")) { serialNumber = "?"; } } catch (Exception e) { if (serialNumber.equals("")) { serialNumber = "?"; } } return serialNumber; } }