How to get device (AOSP) Build Number in Android devices programmatically?

From within an Android Application, how can the hosting device's Build Number, as displayed in System Settings -> About Tablet -> Build Number be obtained programmatically for use within a Java Android application?

平板电脑上的系统设置版本号

Currently, I'm using "android.os.Build".


Check this code..

in Build.FINGERPRINT you'll get the Build Number of the Device.

String mString = "";

    mString.concat("VERSION.RELEASE {" + Build.VERSION.RELEASE + "}");
    mString.concat("nVERSION.INCREMENTAL {" + Build.VERSION.INCREMENTAL + "}");
    mString.concat("nVERSION.SDK {" + Build.VERSION.SDK + "}");
    mString.concat("nBOARD {" + Build.BOARD + "}");
    mString.concat("nBRAND {" + Build.BRAND + "}");
    mString.concat("nDEVICE {" + Build.DEVICE + "}");
    mString.concat("nFINGERPRINT {" + Build.FINGERPRINT + "}");
    mString.concat("nHOST {" + Build.HOST + "}");
    mString.concat("nID {" + Build.ID + "}");

    ((TextView) findViewById(R.id.textView1)).setText(mString);

My Device Build Number :

我的设备内部编号

FINGERPRINT return by the above code

在这里输入图像描述


我希望它是你想要的返回相同的价值..

String build_number = Build.FINGERPRINT;
System.out.println("Build Number" + build_number);

To get this value, use Build.DISPLAY. Here is an example from Verizon Note 2 ( SCH-I605 on android 4.4.2) : KOT49H.I605VRUFND7

Requires : API 3 or higher.

链接地址: http://www.djcxy.com/p/90762.html

上一篇: 以编程方式Android版本码

下一篇: 如何以编程方式在Android设备中获取设备(AOSP)内部版本号?