RAM, ROM, 외부 메모리, 내 응용 프로그램이 실행되는 프로세서 세부 정보 등 장치의 시스템 구성 정보를 얻고 싶습니다. 저는 초보자입니다. 시작하는 데 도움 주시겠습니까?안드로이드 - 이것은 안드로이드 장치의 시스템 구성을 얻을 수 있습니까?
1
A
답변
0
Build
클래스에는 필요한 모든 정보가 포함되어 있어야합니다. 당신이 필요로하는 정보를 얻을 수 here
Nested Classes
class Build.VERSION Various version strings.
class Build.VERSION_CODES Enumeration of the currently known SDK version codes.
Constants
String UNKNOWN Value used for when a build property is unknown.
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 consumer-visible brand with which the product/hardware will be associated, 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 This field was deprecated in API level 14. The radio firmware version is frequently not available when this class is initialized, leading to a blank or "unknown" value for this string. Use getRadioVersion() instead.
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
사용 Build.*
을 확인합니다.
1
먼저 "android-sdk"페이지에서 "Build"클래스를 살펴보십시오 : http://developer.android.com/reference/android/os/Build.html.
// Device model
String PhoneModel = android.os.Build.MODEL;
// Android version
String AndroidVersion = android.os.Build.VERSION.RELEASE;
예 :
public String getDeviceName() {
String manufacturer = Build.MANUFACTURER;
String model = Build.MODEL;
if (model.startsWith(manufacturer)) {
return capitalize(model);
} else {
return capitalize(manufacturer) + " " + model;
}
}
private String getAndroidVersion() {
return android.os.Build.VERSION.RELEASE;
}
private String capitalize(String s) {
if (s == null || s.length() == 0) {
return "";
}
char first = s.charAt(0);
if (Character.isUpperCase(first)) {
return s;
} else {
return Character.toUpperCase(first) + s.substring(1);
}
}
private String getDeviceId() {
String deviceId = "";
final TelephonyManager mTelephony = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
if (mTelephony.getDeviceId() != null) {
deviceId = mTelephony.getDeviceId();
} else {
deviceId = Secure.getString(getApplicationContext()
.getContentResolver(), Secure.ANDROID_ID);
}
return deviceId;
}
관련 문제
- 1. 안드로이드 장치의 회전
- 2. 안드로이드 모바일의 장치 구성을 받으십시오.
- 3. 안드로이드 장치의 조준 위치
- 4. 안드로이드 장치의 활동을 모니터링
- 5. 안드로이드 장치의 방대한 저장소
- 6. 안드로이드 장치의 CPU
- 7. 안드로이드 프로젝트를위한 실행 구성을 설정하려고합니다.
- 8. 안드로이드 장치의 자동 설치
- 9. 안드로이드 장치의 onSensorChanged
- 10. 안드로이드 장치의 이미지 배율
- 11. 어디서 안드로이드 이미지를 얻을 수 있습니까?
- 12. 안드로이드 장치의 모든 사진보기 안드로이드 프로그래밍
- 13. 안드로이드 - 안드로이드 장치의 로컬 호스트에서 데이터베이스를 연결할 수 없습니다
- 14. 안드로이드 장치의 개발 모드에서 C2DM
- 15. 안드로이드 장치의 초기 방향을 설정하는 방법이 있습니까
- 16. 태블릿 장치의 두 번째 배터리 충전 레벨을 얻을 수 있습니까?
- 17. 안드로이드 장치의 임시 폴더는 어디에 있습니까?
- 18. 안드로이드 장치의 나이를 찾는 방법이 있습니까
- 19. 안드로이드 가상 장치의 SD 카드
- 20. 데이터베이스를 안드로이드 장치의/data로 복사하십시오.
- 21. 안드로이드 장치의 위치를 자동으로 얻으십시오.
- 22. 안드로이드 장치의 파일에 쓸 수 없습니다.
- 23. 안드로이드 장치의 메모리 및 저장소
- 24. PushWoosh에서 안드로이드 장치의 잘못된 등록
- 25. 안드로이드 장치의 마이크로폰을 교정하는 방법
- 26. 안드로이드 장치의 화면에 표시되는 텍스트를 수집하는 방법
- 27. 안드로이드 장치의 스 와이프 컨트롤
- 28. PXA270 장치의 포트 안드로이드 OS
- 29. 범위 내에있는 Bluetooth 장치의 이름을 어떻게 얻을 수 있습니까?
- 30. 안드로이드 장치의 시스템 수준 기본 화면 방향 설정