how to get the android phone model, version, sdk details?
The system version is 4.3. Dependencies: Android SDK Platform-tools r18 or higher is required. Android SDK Tools 22.0.
In the SDK Platforms tab, select Android 12. In the SDK Tools tab, select Android SDK Build-Tools 31.
Navigate to “Appearance & Behavior” > “System Settings” > “Android SDK” and now you can see the SDK versions that were installed in the “API Level” and “Name” columns (focus on “API Level”).
First of all, have a look at these "Build" class at android-sdk page: http://developer.android.com/reference/android/os/Build.html.
// Device model String PhoneModel = android.os.Build.MODEL; // Android version String AndroidVersion = android.os.Build.VERSION.RELEASE;
String s = "Debug-info:"; s += "\n OS Version: " + System.getProperty("os.version") + "(" + android.os.Build.VERSION.INCREMENTAL + ")"; s += "\n OS API Level: " + android.os.Build.VERSION.RELEASE + "(" + android.os.Build.VERSION.SDK_INT + ")"; s += "\n Device: " + android.os.Build.DEVICE; s += "\n Model (and Product): " + android.os.Build.MODEL + " (" + android.os.Build.PRODUCT + ")";
Example output:
OS Version: 4.9.106-perf+(1909112330) OS API Level: 9(28) Device: OnePlus6 Model (and Product): ONEPLUS A6000 (OnePlus6)
You can use Build.MODEL and Build.VERSION
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