본문 바로가기
[android] disable fullscreen IME when activity is on landscape mode (IME_FLAG_NO_EXTRACT_UI) - 내 앱이 activity 가 landscape 모드일 때 IME 가 fullscreen 이 되는 현상이 있고, 다른 앱은 fullscreen 이 안 되는 것을 확인하였다. control 가능한 영역인 것을 알 수 있다. - EditorInfo.IME_FLAG_NO_EXTRACT_UI 란 녀석이 있었다. 설명을 보면.. landscape mode 에서 input method 는 fullscreen 이 될 수 있다. 이는 해당 UI 들을 작게 보이게도 하며, 앱을 뒤로 감추기도 한다. IME 가 event 를 모두 먹기 때문에, 보이는 UI 일부는 touch 에 반응하지 못한다. 이는 user 에게 혼란스럽게 만든다. 그래서 이 녀석 대신 FLAG_NO_FULLSCREEN 을 쓰는 것이 더 좋다. IME.. 2023. 1. 10.
[android] android P 부터는 DNS 도 TLS 로 접근할 수 있다! - privacy 와 security 이슈로 "DNS over TLS” 가 고려되었다. (RFC 7858) - Network & Internet settings 에 가면 Private DNS 설정을 볼 수 있다. - 기본적으로 단말은 DNS server 가 DNS over TLS 를 지원한다면 그 기능을 사용한다. 하지만 의도적으로 off 시킬 수 있다. 그리고 private DNS 가 있다면 이걸 지정할 수도 있다. 그럼 모든 DNS query 는 이것을 이용한다. - App 에서는 새로운 API 인 LinkProperties.isPrivateDnsActive() 를 통해 private dns 를 사용하는지 볼 수 있다. - Reference : https://android-developers.goog.. 2023. 1. 8.
[android] Safe Browsing 에 대해 알아보자. - Google Play Protect 가 Safe Browsing 이 기본으로 탑재된 WebView 를 제공한다. 2018년 4월부터이며, 이는 WebView 66 부터이다. WebView 의 Safe Browsing 은 Android 8.0 (API 26, OOS) 부터 Chrome on Android 기술을 통해 가능하다. - 개발자들이 Safe Browsing 의 이득을 얻기 위해 추가로 해줘야 할 건 없다. Safe Browsing 이 trigger 되면 app 은 warning 과 함께 network error 를 받는다. API 27 (O MR1) 이상부터는 Safe Browsing API 들을 사용해서 이를 customize 할 수 있다. - https://developer.android... 2023. 1. 7.
[android studio] Could not find lint-gradle-api.jar 해결 방법 - jcenter 와 google 이 repositories 에 추가되었음에도.. 아래와 같은 에러 메시지를 마딱뜨렸다. Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2). Searched in the following locations: https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar - 나의 순서는 아래와 같았다. repositories{ jcenter() google() } 이를 아래와 같이 순서를 바꾸어주니 해결.... repositories{ google() jcent.. 2023. 1. 6.
[android] Runtime permission group 에 대한 이야기 - Permission group 과 개개의 permission 의 관계가 명확치 않아서 정리해보았다. - 우선 permission 요청은 group 단위가 아닌 개개 permission 단위이다. 예를 들어 READ_PHONE_STATE 만 permission 을 요청하고 grant 해도 Settings 에서는 CALL group 에 대한 permission 이 grant 된 것으로 표시된다. 비록 CALL permission group 은 ON 으로 되었지만, READ_CALL_LOG 등과 같이 grant 하지 않은 permission 을 사용하려고 하면 SecurityException 이 발생한다. - 그럼 Settings 에서 CALL permission group 을 ON 시키면 permissi.. 2022. 12. 31.
[android] implicit broadcast - signature permission or FLAG_RECEIVVER_INCLUDE_BACKGROUND - 안드로이드 가이드에 따르면 targetSdk 를 oreo 이상으로 설정할 경우, implicit broadcast 에 발송에 대해 (대상이 명확하지 않은 broadcast) static receiver 의 경우 수신할 수 없고, dynamic receiver 의 경우 수신할 수 있다. ( 물론, 일부 broadcast 는 예외적이다. https://developer.android.com/guide/components/broadcast-exceptions ) - Oreo 소스 기준 BroadcastQueue.java 의 processNextBroadcast 를 보면 아래 코드가 있다. // ... else if (((r.intent.getFlags()&Intent.FLAG_RECEIVER_EXCLUDE.. 2022. 12. 30.
[android] StrictMode 에 대해 다시 한번 알아보자 - http://aroundck.tistory.com/3429 Android StrictMode Android StrictMode 출처http://code.tutsplus.com/tutorials/android-best-practices-strictmode--mobile-7581http://developer.android.com/reference/android/os/StrictMode.html - android strict mode 는 2가지 category 가 있다. 하나는 thread policy 이 aroundck.tistory.com http://aroundck.tistory.com/2074 [android] Strict Mode 에 대해 알아보자. 안드로이드, Strict Mode 에 대해 알아.. 2022. 12. 29.
[android] FilePath 에 대한 이야기 - API 를 통해 FilePath 를 가져올 때 absolute path 정보가 조금 아리까리하다. 그래서 FilePath return 을 정리하여 감을 잡기 쉽게 하기 위해 이 글을 적어본다. - 아래 path 에 data/user/0 = data/data 이다. (main user 일 경우) - https://developer.android.com/reference/android/content/Context.html#getDir(java.lang.String,%20int) Context.getDir(, MODE_PRIVATE) /data/user/0//app_ - https://developer.android.com/reference/android/content/Context.html#getFile.. 2022. 12. 28.
[android] ListView, RecyclerView 에서 top position 인지 판단하는 방법 - canScrollVertically 를 이용하면 된다. - scrollView.setOnScrollChangeListener{ _, _, _, _, _ -> if(scrollView.canScrollVertically(-1)){ // it’s not top yet } else{ // it’s top } } 끝 2022. 12. 27.
반응형