how can i get android device's platformId,deviceUser,deviceName,deviceModel, deviceOperatingSystem,deviceOSVersion from my program.
Edit: i have already used that Build class and got device id, model and user but for my requirement i need device OS, OS version and platform id.so how can i get them??
thanks
venu
Android system properties allow you to modify the Android operating system on various devices. System properties are not a part of the core operating system and are only available to root users, but they can be used by anyone who has administrator permissions on their device.
The Android build system compiles app resources and source code, and packages them into APKs or Android App Bundles that you can test, deploy, sign, and distribute.
Use android.os.Build
.
Here's an example:
StringBuffer buf = new StringBuffer();
buf.append("VERSION.RELEASE {"+Build.VERSION.RELEASE+"}");
buf.append("\nVERSION.INCREMENTAL {"+Build.VERSION.INCREMENTAL+"}");
buf.append("\nVERSION.SDK_INT {"+Build.VERSION.SDK_INT+"}");
buf.append("\nFINGERPRINT {"+Build.FINGERPRINT+"}");
buf.append("\nBOARD {"+Build.BOARD+"}");
buf.append("\nBRAND {"+Build.BRAND+"}");
buf.append("\nDEVICE {"+Build.DEVICE+"}");
buf.append("\nMANUFACTURER {"+Build.MANUFACTURER+"}");
buf.append("\nMODEL {"+Build.MODEL+"}");
Complete android.os.Build documentation is at http://developer.android.com/reference/android/os/Build.html
Note that VERSION.SDK
is marked as deprecated, so VERSION.SDK_INT
was used instead.
Extending to what CommonsWare suggested, I think here's what you need:
Build.VERSION_CODES: Enumeration of the currently known SDK version codes. These are the values that can be found in SDK. Version numbers increment monotonically with each official platform release.
Build class: Information about the current build, extracted from system properties.
Build.MODEL
Build.PRODUCT
Build.VERSION:
Various version strings.
Build.VERSION.RELEASE
Build.VERSION.SDK_INT
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With