상세 컨텐츠

본문 제목

[안드로이드] 핸드폰의 정보 가져오기(android.os.Build)

Android.. Story

by HeyLee 2011. 4. 24. 14:07

본문


예... Zxing을 공부하다가 공부한 새로운 라이브러리입니다.

벌써 소스코드 뜯어보기 시작한지 3시간째 인데....Zxing 소스코드가 엄청나게 방대하다는 걸 또한 느끼네요.
분석이 넘 힘들다는걸 느끼고 있음..= _=;;;


android.os.Build

Information about the current build, extracted from system properties. 


안드로이드 설명입니다 매우 간단합니다..

사용법도 매우 간단합니다.

String a = Build.제공하는 메소드; 이런식으로 String값으로 반환받을수있습니다.
 

Fields
public static final String BOARD The name of the underlying board, like "goldfish".
public static final String BOOTLOADER The system bootloader version number.
public static final String BRAND The brand (e.g., carrier) the software is customized for, if any.
public static final String CPU_ABI The name of the instruction set (CPU type + ABI convention) of native code.
public static final String CPU_ABI2 The name of the second instruction set (CPU type + ABI convention) of native code.
public static final String DEVICE The name of the industrial design.
public static final String DISPLAY A build ID string meant for displaying to the user
public static final String FINGERPRINT A string that uniquely identifies this build.
public static final String HARDWARE The name of the hardware (from the kernel command line or /proc).
public static final String HOST
public static final String ID Either a changelist number, or a label like "M4-rc20".
public static final String MANUFACTURER The manufacturer of the product/hardware.
public static final String MODEL The end-user-visible name for the end product.
public static final String PRODUCT The name of the overall product.
public static final String RADIO The radio firmware version number.
public static final String SERIAL A hardware serial number, if available.
public static final String TAGS Comma-separated tags describing the build, like "unsigned,debug".
public static final long TIME
public static final String TYPE The type of build, like "user" or "eng".
public static final String USER


StringBuilder를 사용하는것도 좋은방법입니다.

 StringBuffer result = new StringBuffer();

    result.append("Device info:");

    result.append("\n  Board: ");

    result.append(Build.BOARD);

    result.append("\n  Brand: ");

    result.append(Build.BRAND);

    result.append("\n  Device: ");

    result.append(Build.DEVICE);

    result.append("\n  Display: ");

    result.append(Build.DISPLAY);

    result.append("\n  Fingerprint: ");

    result.append(Build.FINGERPRINT);

    result.append("\n  Host: ");

    result.append(Build.HOST);

    result.append("\n  ID: ");

    result.append(Build.ID);

    result.append("\n  Model: ");

    result.append(Build.MODEL);

    result.append("\n  Product: ");

    result.append(Build.PRODUCT);

    result.append("\n  Tags: ");

    result.append(Build.TAGS);

    result.append("\n  Type: ");

    result.append(Build.TYPE);

    result.append("\n  User: ");

    result.append(Build.USER);

    result.append("\n  Version Incremental: ");

    result.append(Build.VERSION.INCREMENTAL);

    result.append("\n  Version Release: ");

    result.append(Build.VERSION.RELEASE);

    result.append("\n  Version SDK: ");

    result.append(Build.VERSION.SDK);

-Zxing sourse code....


So,So... GoodLuck

관련글 더보기

댓글 영역