当前位置: 首页>>代码示例>>Java>>正文


Java Build.PRODUCT属性代码示例

本文整理汇总了Java中android.os.Build.PRODUCT属性的典型用法代码示例。如果您正苦于以下问题:Java Build.PRODUCT属性的具体用法?Java Build.PRODUCT怎么用?Java Build.PRODUCT使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在android.os.Build的用法示例。


在下文中一共展示了Build.PRODUCT属性的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: toJson

String toJson(Context context) {
    try {
        appName = context.getString(R.string.app_name);
        systemType = "Android";
        systemVersion = Build.VERSION.RELEASE;
        version = "1.0";
        deviceModel = Build.MODEL;
        deviceName = Build.PRODUCT;

        PackageInfo pi = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);
        appVersion = pi.versionName;

        TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
        operator = telephonyManager.getSimOperatorName();

        connectionType = NetworkStauts.getCurrentNetworkType(context);
    } catch (PackageManager.NameNotFoundException e) {
        e.printStackTrace();
    }

    return new Gson().toJson(this);
}
 
开发者ID:luffyjet,项目名称:WebViewJavaScriptBridge,代码行数:22,代码来源:DeviceInfoHandler.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: 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

示例7: collectionException

/**
 * 收集奔溃异常信息
 *
 * @param e 异常
 */
private void collectionException(Throwable e) {
    final String deviceInfo = Build.DEVICE + Build.VERSION.SDK_INT + Build.PRODUCT;
    final String errorInfo = e.getMessage();
    new Thread() {
        @Override
        public void run() {
            Log.e("system error:  ", "deviceInfo--->>>" + deviceInfo + "|||"+":errorInfo:  " + errorInfo);
        }
    }.start();

}
 
开发者ID:monsterLin,项目名称:Pigeon,代码行数:16,代码来源:CrashHandler.java

示例8: getProduct

public static String getProduct() {
    return Build.PRODUCT;
}
 
开发者ID:alibaba,项目名称:LuaViewPlayground,代码行数:3,代码来源:AndroidUtil.java

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

示例10: getProduct

public static String getProduct() {
  return Build.PRODUCT;
}
 
开发者ID:Piasy,项目名称:AppRTC-Android,代码行数:3,代码来源:BuildInfo.java

示例11: getProductName

public String getProductName() {
    return Build.PRODUCT;
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:3,代码来源:EnvironmentInfo.java

示例12: lavKontaktinfo

public static String lavKontaktinfo() {
  String ret = "";
  try {

    /*
    for (String afprøvet : afprøvedeTing.keySet()) {
      ret += "\n" + afprøvet + ": " + afprøvedeTing.get(afprøvet);
    }
    ret += "\nOvenstående er korrekt: JA/NEJ\n\n";

    PackageManager pm = instans.getPackageManager();
    String version;
    try {
      PackageInfo pi = pm.getPackageInfo(instans.getPackageName(), 0);
      version = pi.versionName;
    } catch (Exception e) {
      version = e.toString();
      e.printStackTrace();
    }

    ret += instans.getPackageName() + " (v " + version + ")" + "\nTelefonmodel: " + Build.MODEL + " " + Build.PRODUCT + "\nAndroid v" + Build.VERSION.RELEASE + " (sdk: " + Build.VERSION.SDK + ")";
    */
    AudioManager am = (AudioManager) ApplicationSingleton.instans.getSystemService(Context.AUDIO_SERVICE);
    LinkedHashSet<String> udgange = new LinkedHashSet<>();
    if (am.isBluetoothA2dpOn()) udgange.add("BluetoothA2dp");
    if (am.isBluetoothScoOn()) udgange.add("BluetoothSco");
    if (am.isSpeakerphoneOn()) udgange.add("Speakerphone");
    if (am.isWiredHeadsetOn()) udgange.add("(Kablede høretelefoner forbundne)");

    ret += "\nVersion: "+App.versionsnavn +
        "\nTelefonmodel: " + Build.MODEL + " " + Build.PRODUCT +
        "\nAndroid v" + Build.VERSION.RELEASE + " (sdk: " + Build.VERSION.SDK_INT + ")";
    ret += "\nFunktioner brugt: "+ Sidevisning.getViste();
//    ret += "\nFunktioner ej brugt: "+ Sidevisning.getIkkeViste();
    ret += "\nIndstillinger: "+ App.prefs.getAll();
    ret += "\nAfspiller: "+ App.afspiller.toString();
    ret += "\nUdgange: "+ udgange;
  } catch (Exception e) {
    Log.rapporterFejl(e);
  }
  return ret;
}
 
开发者ID:nordfalk,项目名称:EsperantoRadio,代码行数:42,代码来源:Log.java

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

示例14: isMagicBoxDevice

public static boolean isMagicBoxDevice() {
    String manufacturer = Build.MANUFACTURER;
    String productName = Build.PRODUCT;
    return manufacturer.equalsIgnoreCase("MagicBox")
        && productName.equalsIgnoreCase("MagicBox");
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:6,代码来源:DeviceUtils.java


注:本文中的android.os.Build.PRODUCT属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。