Tutorials Android How to Get Device Information in Android

How to Get Device Information in Android

The following code snippet will get the device detailed information in Android.

public class DashboardActivity extends Activity { 

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        String  details =  "VERSION.RELEASE : "+Build.VERSION.RELEASE
            +"nVERSION.INCREMENTAL : "+Build.VERSION.INCREMENTAL
            +"nVERSION.SDK.NUMBER : "+Build.VERSION.SDK_INT
            +"nBOARD : "+Build.BOARD
            +"nBOOTLOADER : "+Build.BOOTLOADER
            +"nBRAND : "+Build.BRAND
            +"nCPU_ABI : "+Build.CPU_ABI
            +"nCPU_ABI2 : "+Build.CPU_ABI2
            +"nDISPLAY : "+Build.DISPLAY
            +"nFINGERPRINT : "+Build.FINGERPRINT
            +"nHARDWARE : "+Build.HARDWARE
            +"nHOST : "+Build.HOST
            +"nID : "+Build.ID
            +"nMANUFACTURER : "+Build.MANUFACTURER
            +"nMODEL : "+Build.MODEL
            +"nPRODUCT : "+Build.PRODUCT
            +"nSERIAL : "+Build.SERIAL
            +"nTAGS : "+Build.TAGS
            +"nTIME : "+Build.TIME
            +"nTYPE : "+Build.TYPE
            +"nUNKNOWN : "+Build.UNKNOWN
            +"nUSER : "+Build.USER;

           TextView textView = new TextView();

           textView.setText(details);
           setContentView(textView);
        }
}

Total
0
Shares
guest
0 Comments
Inline Feedbacks
View all comments
Previous Post

How to Create Custom Layout in Android by Extending ViewGroup Class

Next Post

How to Customize Android Keyboard Actions and Other Hacks

Related Posts
By clicking “Allow All”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Cookie Notice
Allow All
0
Would love your thoughts, please comment.x
()
x