본문 바로가기

Android124

biometric를 활용한 안드로이드 생체인증 그래들에 의존성 추가합니다. implementation 'androidx.biometric:biometric:1.2.0-alpha04' private lateinit var executor: Executor private lateinit var biometricPrompt: BiometricPrompt private lateinit var promptInfo: BiometricPrompt.PromptInfo 전역변수로 선언해줍니다. executor = ContextCompat.getMainExecutor(this@MainActivity) 인자값으로 Context 넣어 줍니다. biometricPrompt = BiometricPrompt(this@MainActivity, executor, object : .. 2024. 2. 23.
안드로이드 14 java.lang.SecurityException: Writable dex file '/data/data/packageName/code_cache/.overlay/base.apk/classes3.dex' is not allowed. 안드로이드 14를 넘어오면서 앱을 빌드해서 테스트폰에 실행 후 두번째 앱 빌드부터 에러가 발생하며 팅기는 현상이 발생했다. dex파일이 읽기/쓰기가 가능해서 보안문제가 발생 한 것 같습니다. dex파일을 읽기전용으로 변경해줌으로 오류가 해결되었습니다. 앱을 한번 삭제 후 해당 코드를 적고 재빌드 해주시면 됩니다. val dexOutputDir: File = codeCacheDir dexOutputDir.setReadOnly() 2024. 2. 7.
안드로이드 BLE 통신 예제 by Kotlin 안녕하세요 이번에는 BLE 통신예제를 해보도록 할게요. 우선 메니페스트에 권한을 먼저 넣어주겠습니다. 그리고 권한 체크도 꼭 해주세요. permissions = arrayOf( Manifest.permission.BLUETOOTH, Manifest.permission.BLUETOOTH_ADMIN, Manifest.permission.BLUETOOTH_SCAN, Manifest.permission.BLUETOOTH_CONNECT, Manifest.permission.BLUETOOTH_ADVERTISE, Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.POST_NOTI.. 2023. 6. 16.
안드로이드 글라이드로 이미지 URL 로드 시 변경 안될때 이미지 url로 이미를 로드하게되면 캐시가 남아서 변경된 이미지 url을 로드해도 안되는 경우가 있습니다. RequestOptions requestOptions = new RequestOptions(); requestOptions.diskCacheStrategy(DiskCacheStrategy.NONE); requestOptions.skipMemoryCache(false); requestOptions.signature(new ObjectKey(System.currentTimeMillis())); Glide.with(mContext) .load(imageList.get(position)) .apply(requestOptions).into(imageView); 해당 옵션으로 로드해주시면 새롭게 로드하게 되어.. 2023. 4. 18.