I have a requirement for obtaining the hardware related information on an Android device that runs my application. I need information of the following sort.
**This Code give you information about following **
Fingerprint
DisplayMetrics dm = new DisplayMetrics();
getActivity().getWindowManager().getDefaultDisplay().getMetrics(dm);
double x = Math.pow(mWidthPixels / dm.xdpi, 2);
double y = Math.pow(mHeightPixels / dm.ydpi, 2);
screenInches = Math.sqrt(x + y);
rounded = df2.format(screenInches);
densityDpi = (int) (dm.density * 160f);
Manufacturer_value = Build.MANUFACTURER;
Brand_value = Build.BRAND;
Model_value = Build.MODEL;
Board_value = Build.BOARD;
Hardware_value = Build.HARDWARE;
Serial_nO_value = Build.SERIAL;
UID_value = tManager.getDeviceId();
android_id =
Settings.Secure.getString(getContext().getContentResolver(),
Settings.Secure.ANDROID_ID);
ScreenResolution_value = mHeightPixels + " * " + mWidthPixels + " Pixels";
screen_size = rounded + " Inches";
screen_density = String.valueOf(densityDpi) + " dpi";
BootLoader_value = Build.BOOTLOADER;
User_value = Build.USER;
Host_value = Build.HOST;
Version = Build.VERSION.RELEASE;
API_level = Build.VERSION.SDK_INT + "";
Build_ID = Build.ID;
Build_Time = Build.TIME + "";
Fingerprint = Build.FINGERPRINT;