170818 안드로이드 앱 관련된 환경정보들
170818 안드로이드 앱 관련된 환경정보들
android
study
안드 개발할때 환경정보 가져오는 부분이 헷갈릴때가 종종 있는데,
이번기회에 한번 전부 출력해서 이에 대한 이해를 높일려고 글을 올린다.
Context.Dir…
context.getCacheDir() : /data/user/0/com.hhd2002.hhdtest/cache
context.getFilesDir() : /data/user/0/com.hhd2002.hhdtest/files
context.getObbDir() : /storage/emulated/0/Android/obb/com.hhd2002.hhdtest
context.getExternalCacheDir() : /storage/emulated/0/Android/data/com.hhd2002.hhdtest/cache
Environment.Dir…
Environment.getDataDirectory() : /data
Environment.getRootDirectory() : /system
Environment.getDownloadCacheDirectory() : /cache
Environment.getExternalStorageDirectory() : /storage/emulated/0
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_ALARMS)) : /storage/emulated/0/Alarms
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM) : /storage/emulated/0/DCIM
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOCUMENTS) : /storage/emulated/0/Documents
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) : /storage/emulated/0/Download
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_MOVIES) : /storage/emulated/0/Movies
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_NOTIFICATIONS) : /storage/emulated/0/Notifications
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) : /storage/emulated/0/Pictures
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_RINGTONES) : /storage/emulated/0/Ringtones
PackageName
context.getPackageName() : com.hhd2002.hhdtest
ApplicationInfo
context.getApplicationInfo() : {
"className": "com.hhd2002.hhdtest.DiApplication",
"compatibleWidthLimitDp": 0,
"dataDir": "/data/user/0/com.hhd2002.hhdtest",
"descriptionRes": 0,
"enabled": true,
"enabledSetting": 0,
"flags": 952680262,
"fullBackupContent": 0,
"installLocation": -1,
"largestWidthLimitDp": 0,
"nativeLibraryDir": "/data/app/com.hhd2002.hhdtest-2/lib/arm64",
"nativeLibraryRootDir": "/data/app/com.hhd2002.hhdtest-2/lib",
"nativeLibraryRootRequiresIsa": true,
"overrideRes": 0,
"primaryCpuAbi": "arm64-v8a",
"privateFlags": 0,
"processName": "com.hhd2002.hhdtest",
"publicSourceDir": "/data/app/com.hhd2002.hhdtest-2/base.apk",
"requiresSmallestWidthDp": 0,
"scanPublicSourceDir": "/data/app/com.hhd2002.hhdtest-2",
"scanSourceDir": "/data/app/com.hhd2002.hhdtest-2",
"seinfo": "default",
"sourceDir": "/data/app/com.hhd2002.hhdtest-2/base.apk",
"splitPublicSourceDirs": [
"/data/app/com.hhd2002.hhdtest-2/split_lib_dependencies_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_0_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_1_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_2_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_3_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_4_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_5_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_6_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_7_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_8_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_9_apk.apk"
],
"splitSourceDirs": [
"/data/app/com.hhd2002.hhdtest-2/split_lib_dependencies_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_0_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_1_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_2_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_3_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_4_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_5_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_6_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_7_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_8_apk.apk",
"/data/app/com.hhd2002.hhdtest-2/split_lib_slice_9_apk.apk"
],
"targetSdkVersion": 26,
"taskAffinity": "com.hhd2002.hhdtest",
"theme": 2131755013,
"uiOptions": 0,
"uid": 10258,
"versionCode": 1,
"banner": 0,
"icon": 2131165406,
"labelRes": 2131689504,
"logo": 0,
"packageName": "com.hhd2002.hhdtest",
"showUserIcon": -10000
}
Resources.DisplayMetrics
context.getResources().getDisplayMetrics() : {
"density": 4.0,
"densityDpi": 640,
"heightPixels": 2392,
"noncompatDensity": 4.0,
"noncompatDensityDpi": 640,
"noncompatHeightPixels": 2392,
"noncompatScaledDensity": 4.0,
"noncompatWidthPixels": 1440,
"noncompatXdpi": 537.882,
"noncompatYdpi": 537.388,
"scaledDensity": 4.0,
"widthPixels": 1440,
"xdpi": 537.882,
"ydpi": 537.388
}
Resources.Configuration
context.getResources().getConfiguration() : {
"colorNavigationBar": -16777216,
"compatScreenHeightDp": 510,
"compatScreenWidthDp": 320,
"compatSmallestScreenWidthDp": 320,
"densityDpi": 640,
"fontScale": 1.0,
"fontTypeIndex": 0,
"forceEmbolden": 0,
"hardKeyboardHidden": 2,
"keyboard": 1,
"keyboardHidden": 1,
"locale": "ko_KR",
"mcc": 450,
"mnc": 8,
"navigation": 1,
"navigationHidden": 2,
"orientation": 1,
"screenHeightDp": 574,
"screenLayout": 268435794,
"screenWidthDp": 360,
"seq": 7,
"smallestScreenWidthDp": 360,
"themePackage": "com.lge.launcher2.theme.optimus",
"touchscreen": 3,
"uiMode": 17,
"userSetLocale": false
}
PackageManager.SystemAvailableFeatures
context.getPackageManager().getSystemAvailableFeatures() : [
{
"flags": 0,
"name": "android.hardware.sensor.proximity",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.sensor.accelerometer",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.faketouch",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.usb.accessory",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.software.backup",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.touchscreen",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.touchscreen.multitouch",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.software.print",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "com.lge.software.cliptray",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.software.voice_recognizers",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.sensor.gyroscope",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.opengles.aep",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.bluetooth",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.camera.autofocus",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.telephony.gsm",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.usb.host",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.audio.output",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.camera.flash",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.camera.front",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.screen.portrait",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.nfc",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.sensor.stepdetector",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.software.home_screen",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.microphone",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.bluetooth_le",
"reqGlEsVersion": 0
},
{
"flags": 0,
"name": "android.hardware.sensor.compass",
"reqGlEsVersion": 0
},
PackageManager.SystemSharedLibraryNames
context.getPackageManager().getSystemSharedLibraryNames() : [
"com.qualcomm.qcnvitems",
"com.google.widevine.software.drm",
"com.qti.dpmapi",
"com.google.android.media.effects",
"com.lge.broadcast.tdmb",
"com.qti.location.sdk",
"com.lge.resources",
"com.quicinc.wbcservice",
"com.lge.locksettings",
"com.android.location.provider",
"com.lge.systemui",
"com.qualcomm.qti.QtiTelephonyServicelibrary",
"com.quicinc.cneapiclient",
"com.android.future.usb.accessory",
"com.qti.dpmframework",
"javax.obex",
"com.google.android.gms",
"com.android.lge.lgsvcitems",
"com.lge.zdi.splitwindow",
"com.qualcomm.qcrilhook",
"android.test.runner",
"com.lge.mdm",
"com.lge.sui",
"com.google.android.maps",
"ConnectivityExt",
"com.lge.lghiddenlibs",
"org.apache.http.legacy",
"com.broadcom.bt",
"com.android.media.remotedisplay",
"com.quicinc.wbc",
"com.android.mediadrm.signer",
"com.qti.snapdragon.sdk.display"
]
이 글은 Evernote에서 작성되었습니다. Evernote는 하나의 업무 공간입니다. Evernote를 다운로드하세요. |
댓글
댓글 쓰기