Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get the android phone model, version, sdk details?

Tags:

android

how to get the android phone model, version, sdk details?

like image 303
jaks Avatar asked Aug 29 '10 21:08

jaks


People also ask

What is Android SDK version?

The system version is 4.3. Dependencies: Android SDK Platform-tools r18 or higher is required. Android SDK Tools 22.0.

What is the sdk version of Android 12?

In the SDK Platforms tab, select Android 12. In the SDK Tools tab, select Android SDK Build-Tools 31.

How do I find my Android SDK version?

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”).


3 Answers

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; 
like image 163
Paresh Mayani Avatar answered Sep 19 '22 11:09

Paresh Mayani


 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) 
like image 39
Ajay Avatar answered Sep 23 '22 11:09

Ajay


You can use Build.MODEL and Build.VERSION

like image 32
Megha Joshi - GoogleTV DevRel Avatar answered Sep 21 '22 11:09

Megha Joshi - GoogleTV DevRel