private static String getDeviceSerialNumber ( ) { // We're using the Reflection API because Build.SERIAL is only available // since API Level 9 (Gingerbread, Android 2.3). try { return ( String ) Build . class . getField ( "SERIAL" ) . get ( null ) ; } catch ( Exception ignored ) { return null ; } }
Gets the hardware serial number of this device .