How to get android device properties

前端 未结 3 1786
我寻月下人不归
我寻月下人不归 2020-12-17 20:42

how can i get android device\'s platformId,deviceUser,deviceName,deviceModel, deviceOperatingSystem,deviceOSVersion from my program.

Edit: i have already used that B

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-17 21:15

    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.

提交回复
热议问题