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


Java Build.MANUFACTURER屬性代碼示例

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


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

示例1: sendFeedback

public static void sendFeedback(Context context) {
    String body = null;
    try {
        body = context.getPackageManager().getPackageInfo(context.getPackageName(), 0).versionName;
        body = "\n\n-----------------------------\nPlease don't remove this information\n Device OS: Android \n Device OS version: " +
                Build.VERSION.RELEASE + "\n App Version: " + body + "\n Device Brand: " + Build.BRAND +
                "\n Device Model: " + Build.MODEL + "\n Device Manufacturer: " + Build.MANUFACTURER;
    } catch (PackageManager.NameNotFoundException e) {
    }
    Intent intent = new Intent(Intent.ACTION_SEND);
    intent.setType("message/rfc822");
    intent.putExtra(Intent.EXTRA_EMAIL, new String[]{"[email protected]"});
    intent.putExtra(Intent.EXTRA_SUBJECT, "發送自你的安卓設備");
    intent.putExtra(Intent.EXTRA_TEXT, body);
    context.startActivity(Intent.createChooser(intent, context.getString(R.string.choose_email_client)));
}
 
開發者ID:wendyltan,項目名稱:EasyTodo,代碼行數:16,代碼來源:SettingsActivity.java

示例2: 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

示例3: updateDeviceInfo

private void updateDeviceInfo() {

        if (!configuration.isDeviceManufacturerCollectionDisabled()) {
            this.manufacturer = Build.MANUFACTURER;
        }

        if (!configuration.isDeviceModelCollectionDisabled()) {
            this.model = Build.MODEL;
        }

        if (!configuration.isOperaringSystemCollectionDisbaled()) {
            this.operatingSystem = BASE_NAME + " " + Build.VERSION.RELEASE;
        }

        if (!configuration.isChargingInfoCollectionDisabled()) {
            Intent batteryIntent = context.registerReceiver(
                    null,
                    new IntentFilter(Intent.ACTION_BATTERY_CHANGED)
            );
            this.isCharging = String.valueOf(isDeviceCharging(batteryIntent));
        }
    }
 
開發者ID:OpenLocate,項目名稱:openlocate-android,代碼行數:22,代碼來源:InformationFieldsFactory.java

示例4: e

private e(Context context) {
    this.b = "2.0.3";
    this.L = VERSION.SDK_INT;
    this.M = Build.MODEL;
    this.ab = Build.MANUFACTURER;
    this.bq = Locale.getDefault().getLanguage();
    this.aQ = 0;
    this.aR = null;
    this.aS = null;
    this.cB = null;
    this.cC = null;
    this.cD = null;
    this.cE = null;
    this.cF = null;
    this.cB = context.getApplicationContext();
    this.cA = l.x(this.cB);
    this.a = l.D(this.cB);
    this.br = c.e(this.cB);
    this.bs = l.C(this.cB);
    this.bt = TimeZone.getDefault().getID();
    Context context2 = this.cB;
    this.aQ = l.au();
    this.al = l.H(this.cB);
    this.aR = this.cB.getPackageName();
    if (this.L >= 14) {
        this.cC = l.M(this.cB);
    }
    context2 = this.cB;
    this.cD = l.az().toString();
    this.cE = l.L(this.cB);
    this.cF = l.ax();
    this.aS = l.R(this.cB);
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:33,代碼來源:e.java

示例5: getCrashHead

/**
 * 獲取崩潰頭
 *
 * @return 崩潰頭
 */
private String getCrashHead() {
    return "\n************* Crash Log Head ****************" +
            "\nDevice Manufacturer: " + Build.MANUFACTURER +// 設備廠商
            "\nDevice Model       : " + Build.MODEL +// 設備型號
            "\nAndroid Version    : " + Build.VERSION.RELEASE +// 係統版本
            "\nAndroid SDK        : " + Build.VERSION.SDK_INT +// SDK版本
            "\nApp VersionName    : " + versionName +
            "\nApp VersionCode    : " + versionCode +
            "\n************* Crash Log Head ****************\n\n";
}
 
開發者ID:angcyo,項目名稱:RLibrary,代碼行數:15,代碼來源:CrashUtils.java

示例6: getPhoneSysInfo

/**
 * 獲取崩潰頭
 *
 * @return 崩潰頭
 */
public static String getPhoneSysInfo() {
    return "\n************* Log Head ****************" +
            "\nDevice Manufacturer: " + Build.MANUFACTURER +// 設備廠商
            "\nDevice Model       : " + Build.MODEL +// 設備型號
            "\nAndroid Version    : " + Build.VERSION.RELEASE +// 係統版本
            "\nAndroid SDK        : " + Build.VERSION.SDK_INT +// SDK版本
            "\nApp VersionName    : " + getAppVersionName() +
            "\nApp VersionCode    : " + getAppVersionCode() +
            "\n************* Log Head ****************\n\n";
}
 
開發者ID:tututututututu,項目名稱:BaseCore,代碼行數:15,代碼來源:AppUtils.java

示例7: c

private c(Context context) {
    this.b = StatConstants.VERSION;
    this.d = VERSION.SDK_INT;
    this.e = Build.MODEL;
    this.f = Build.MANUFACTURER;
    this.g = Locale.getDefault().getLanguage();
    this.l = 0;
    this.m = null;
    this.n = null;
    this.o = null;
    this.p = null;
    this.q = null;
    this.r = null;
    this.n = context;
    this.c = k.d(context);
    this.a = k.n(context);
    this.h = StatConfig.getInstallChannel(context);
    this.i = k.m(context);
    this.j = TimeZone.getDefault().getID();
    this.l = k.s(context);
    this.k = k.t(context);
    this.m = context.getPackageName();
    if (this.d >= 14) {
        this.o = k.A(context);
    }
    this.p = k.z(context).toString();
    this.q = k.x(context);
    this.r = k.e();
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:29,代碼來源:c.java

示例8: phoneBrand

/**
 * 獲取手機品牌
 *
 * @return
 */
private String phoneBrand() {
    try {
        return Build.MANUFACTURER;
    } catch (Exception e) {
        return "";
    }
}
 
開發者ID:hushengjun,項目名稱:FastAndroid,代碼行數:12,代碼來源:PhoneManager.java

示例9: loadClass

@Override
protected Class<?> loadClass(String className, boolean resolve) throws ClassNotFoundException {

    if (Build.MANUFACTURER != null && sPreLoader.contains(Build.MANUFACTURER.toUpperCase())) {
        try {
            /**
             * FUCK QIKU!
             * 這裏適配奇酷手機青春版。
             * 因為奇酷手機自己加載了自己修改過的的Support V4庫,在插件中也用了這個庫的時候,ClassLoader會優先加載奇酷手機自帶的Support V4庫。
             * 原因在於,奇酷手機沒有預加載插件中打的Support V4庫。詳情可以研究super.loadClass(className, resolve)標準實現
             * 但是這可能會導致類不兼容,出現java.lang.IncompatibleClassChangeError。因為插件編譯時使用的插件的Support V4,而奇酷手機則使
             * 用的是它修改過的Support V4。
             *
             * SO,在Class Loader加載某個Class的時候,我們優先從自己的ClassLoader中加載Class,如果找不到,再從Parent Class Loader中去加載。
             * 這樣修改後,Class的加載順序就跟係統的不一樣了。
             *
             */
            Class<?> clazz = findClass(className);
            if (clazz != null) {
                return clazz;
            }
        } catch (ClassNotFoundException e) {
            Log.e("PluginClassLoader", "UCK QIKU:error", e);
        }
    }
    return super.loadClass(className, resolve);
}
 
開發者ID:amikey,項目名稱:DroidPlugin,代碼行數:27,代碼來源:PluginClassLoader.java

示例10: 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

示例11: getDeviceName

public String getDeviceName() {
    String manufacturer = Build.MANUFACTURER;
    String model = Build.MODEL;
    if (model.startsWith(manufacturer)) {
        return capitalize(model);
    } else {
        return capitalize(manufacturer) + " " + model;
    }
}
 
開發者ID:sarveshchavan7,項目名稱:Trivia-Knowledge,代碼行數:9,代碼來源:HomeSettingTab.java

示例12: leakInfo

public static String leakInfo(Context context, HeapDump heapDump, AnalysisResult result,
                              boolean detailed) {
    PackageManager packageManager = context.getPackageManager();
    String packageName = context.getPackageName();
    try {
        PackageInfo packageInfo = packageManager.getPackageInfo(packageName, 0);
        String info = "In " + packageName + ":" + packageInfo.versionName + ":" + packageInfo
                .versionCode + ".\n";
        String detailedString = "";
        if (result.leakFound) {
            if (result.excludedLeak) {
                info = info + "* LEAK CAN BE IGNORED.\n";
            }
            info = info + "* " + result.className;
            if (!heapDump.referenceName.equals("")) {
                info = info + " (" + heapDump.referenceName + SocializeConstants.OP_CLOSE_PAREN;
            }
            info = info + " has leaked:\n" + result.leakTrace.toString() + "\n";
            if (detailed) {
                detailedString = "\n* Details:\n" + result.leakTrace.toDetailedString();
            }
        } else {
            info = result.failure != null ? info + "* FAILURE:\n" + Log.getStackTraceString
                    (result.failure) + "\n" : info + "* NO LEAK FOUND.\n\n";
        }
        return info + "* Reference Key: " + heapDump.referenceKey + "\n" + "* Device: " +
                Build.MANUFACTURER + " " + Build.BRAND + " " + Build.MODEL + " " + Build
                .PRODUCT + "\n" + "* Android Version: " + VERSION.RELEASE + " API: " +
                VERSION.SDK_INT + " LeakCanary: " + BuildConfig.LIBRARY_VERSION + "\n" + "* " +
                "Durations: watch=" + heapDump.watchDurationMs + "ms, gc=" + heapDump
                .gcDurationMs + "ms, heap dump=" + heapDump.heapDumpDurationMs + "ms, " +
                "analysis=" + result.analysisDurationMs + "ms" + "\n" + detailedString;
    } catch (NameNotFoundException e) {
        throw new RuntimeException(e);
    }
}
 
開發者ID:JackChan1999,項目名稱:boohee_v5.6,代碼行數:36,代碼來源:LeakCanary.java

示例13: getDeviceName

public static String getDeviceName() {
    final String manufacturer = Build.MANUFACTURER, model = Build.MODEL;
    return model.startsWith(manufacturer) ? capitalizePhrase(model) : capitalizePhrase(manufacturer) + " " + model;
}
 
開發者ID:mDL-ILP,項目名稱:mDL-ILP,代碼行數:4,代碼來源:WebAPI.java

示例14: getManufacturer

/**
 * 獲取設備廠商
 */
public static String getManufacturer() {
    return Build.MANUFACTURER;
}
 
開發者ID:ChangsenLai,項目名稱:codedemos,代碼行數:6,代碼來源:DeviceUtil.java

示例15: isMiBox2Device

public static boolean isMiBox2Device() {
    String manufacturer = Build.MANUFACTURER;
    String productName = Build.PRODUCT;
    return manufacturer.equalsIgnoreCase("Xiaomi")
        && productName.equalsIgnoreCase("dredd");
}
 
開發者ID:lisnstatic,項目名稱:live_master,代碼行數:6,代碼來源:DeviceUtils.java


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