當前位置: 首頁>>代碼示例>>Java>>正文


Java Build.HARDWARE屬性代碼示例

本文整理匯總了Java中android.os.Build.HARDWARE屬性的典型用法代碼示例。如果您正苦於以下問題:Java Build.HARDWARE屬性的具體用法?Java Build.HARDWARE怎麽用?Java Build.HARDWARE使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在android.os.Build的用法示例。


在下文中一共展示了Build.HARDWARE屬性的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getHandSetInfo

private static String getHandSetInfo() {
    String handSetInfo = "手機型號:" + Build.MODEL
            + "\n係統版本:" + Build.VERSION.RELEASE
            + "\n產品型號:" + Build.PRODUCT
            + "\n版本顯示:" + Build.DISPLAY
            + "\n係統定製商:" + Build.BRAND
            + "\n設備參數:" + Build.DEVICE
            + "\n開發代號:" + Build.VERSION.CODENAME
            + "\nSDK版本號:" + Build.VERSION.SDK_INT
            + "\nCPU類型:" + Build.CPU_ABI
            + "\n硬件類型:" + Build.HARDWARE
            + "\n主機:" + Build.HOST
            + "\n生產ID:" + Build.ID
            + "\nROM製造商:" + Build.MANUFACTURER // 這行返回的是rom定製商的名稱
            ;
    Log.e("tt",handSetInfo);
    return handSetInfo;
}
 
開發者ID:hss01248,項目名稱:MainActivityUIUtil,代碼行數:18,代碼來源:StatusbarUtil.java

示例2: deviceInf

public static void deviceInf(Context ctx) {

        String deviceInfo = "Device Info:";
        deviceInfo += "\n Android Version: " + Build.VERSION.RELEASE;
        deviceInfo += "\n OS API Level: " + android.os.Build.VERSION.SDK_INT;
        deviceInfo += "\n OS Version: " + System.getProperty("os.version") + "(" + android.os.Build.VERSION.INCREMENTAL + ")";
        deviceInfo += "\n Device: " + android.os.Build.DEVICE;

        deviceInfo += "\n Model (and Product): " + android.os.Build.MODEL + " (" + android.os.Build.PRODUCT + ")";
        deviceInfo += "\n Model manufacturer:" + Build.BRAND;
        deviceInfo += "\n Model Hardware:" +Build.HARDWARE;

        PackageInfo pinfo = null;
        try {
            pinfo = ctx.getPackageManager().getPackageInfo(ctx.getPackageName(), 0);
        } catch (PackageManager.NameNotFoundException e1) {
            e1.printStackTrace();
        }

        int versionNumber = pinfo.versionCode;
        String versionName = pinfo.versionName;

        deviceInfo +="\n App Version : " + versionName + versionNumber;
        deviceInfo += "\n Root Status:" +isRooted();

        String locale = ctx.getResources().getConfiguration().locale.getCountry();
        deviceInfo += "\n Country:" + locale;

        Intent email = new Intent(Intent.ACTION_SEND);

        String emailID = emailaddress();
        email.putExtra(Intent.EXTRA_EMAIL, new String[]{emailID});
        email.putExtra(Intent.EXTRA_SUBJECT, ctx.getPackageName() + " Feedback /Bug Report");
        email.setType("message/rfc822");
        email.putExtra(Intent.EXTRA_TEXT, "\n\n\n" + deviceInfo);
        Intent new_intent = Intent.createChooser(email, "Email Via...");
        new_intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        ctx.startActivity(new_intent);

    }
 
開發者ID:kanishqgupta,項目名稱:FeedbackerLib,代碼行數:40,代碼來源:feedbacker.java

示例3: getDeviceDetails

public static String getDeviceDetails(Context context) {

        return "Device Information\n"
                + "\nDEVICE.ID : " + getDeviceId(context)
                + "\nUSER.ID : " + getUserIdentity(context)
                + "\nAPP.VERSION : " + getAppVersion(context)
                + "\nLAUNCHER.APP : " + getCurrentLauncherApp(context)
                + "\nTIMEZONE : " + timeZone()
                + "\nVERSION.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;
    }
 
開發者ID:MindorksOpenSource,項目名稱:CrashReporter,代碼行數:31,代碼來源:AppUtils.java

示例4: getDeviceInfo

/**
 * 獲取設備信息
 */
public String getDeviceInfo(Context context) {
    return getEmulatorName(context) + "\n" + "Build.PRODUCT: " + Build.PRODUCT + "\n" +
            "Build.MANUFACTURER: " + Build.MANUFACTURER + "\n" +
            "Build.BRAND: " + Build.BRAND + "\n" +
            "Build.DEVICE: " + Build.DEVICE + "\n" +
            "Build.MODEL: " + Build.MODEL + "\n" +
            "Build.HARDWARE: " + Build.HARDWARE + "\n" +
            "Build.FINGERPRINT: " + Build.FINGERPRINT;
}
 
開發者ID:CodyyAndroid,項目名稱:EmulatorDetect,代碼行數:12,代碼來源:EmulatorDetectorService.java

示例5: getDeviceListing

/**
 *
 * @return all involved Build.* parameters and its values
 */
public static String getDeviceListing() {
    return "Build.PRODUCT: " + Build.PRODUCT + "\n" +
            "Build.MANUFACTURER: " + Build.MANUFACTURER + "\n" +
            "Build.BRAND: " + Build.BRAND + "\n" +
            "Build.DEVICE: " + Build.DEVICE + "\n" +
            "Build.MODEL: " + Build.MODEL + "\n" +
            "Build.HARDWARE: " + Build.HARDWARE + "\n" +
            "Build.FINGERPRINT: " + Build.FINGERPRINT + "\n" +
            "Build.CPU_ABI: " + Build.CPU_ABI + "\n" +
            "Build.CPU_ABI2: " + Build.CPU_ABI2 + "\n" +
            "Build.HOST: " + Build.HOST;
}
 
開發者ID:zhuangzaiku,項目名稱:AndroidCollection,代碼行數:16,代碼來源:EmulatorDetector.java

示例6: getDeviceInfo

public String getDeviceInfo() {
    return "\n" +
            "Brand:" +
            Build.BRAND +
            "\n" +
            "Manufacturer:" +
            Build.MANUFACTURER +
            "\n" +
            "Product:" +
            Build.PRODUCT +
            "\n" +
            "Board:" +
            Build.BOARD +
            "\n" +
            "Bootloader:" +
            Build.BOOTLOADER +
            "\n" +
            "CPU_abi:" +
            Build.CPU_ABI +
            "\n" +
            "CPU_abi2:" +
            Build.CPU_ABI2 +
            "\n" +
            "DEVICE:" +
            Build.DEVICE +
            "\n" +
            "Display:" +
            Build.DISPLAY +
            "\n" +
            "Fingerprint:" +
            Build.FINGERPRINT +
            "\n" +
            "Hardware:" +
            Build.HARDWARE +
            "\n" +
            "Host:" +
            Build.HOST +
            "\n" +
            "ID:" +
            Build.ID +
            "\n" +
            "Model:" +
            Build.MODEL +
            "\n" +
            "Time:" +
            Build.TIME +
            "\n" +
            "Type:" +
            Build.TYPE +
            "\n" +
            "User:" +
            Build.USER +
            "\n" +
            "CodeName:" +
            Build.VERSION.CODENAME +
            "\n" +
            "Incremental:" +
            Build.VERSION.INCREMENTAL +
            "\n" +
            "Release:" +
            Build.VERSION.RELEASE +
            "\n" +
            "SDK:" +
            Build.VERSION.SDK_INT +
            "\n";
}
 
開發者ID:alphater,項目名稱:garras,代碼行數:66,代碼來源:BaseFragment.java

示例7: getHardware

public static String getHardware() {
    return Build.HARDWARE;
}
 
開發者ID:jeasinlee,項目名稱:AndroidBasicLibs,代碼行數:3,代碼來源:DeviceUtils.java

示例8: deviceHardware

public static String deviceHardware() {
    return Build.DEVICE + " " + Build.HARDWARE;
}
 
開發者ID:angcyo,項目名稱:RLibrary,代碼行數:3,代碼來源:Device.java


注:本文中的android.os.Build.HARDWARE屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。