in Android - Over 8 years experience in Android - Open Source Contributor - Technical Blogs & Books Writer - Love to share my knowledge with others Follow me on Twitter @WajahatKarim Visit my website: wajahatkarim.com
keep conversations in view and accessible while multitasking ◦ Only for chat / messaging apps ◦ Created with Notifications API ◦ Better than SYSTEM_ALERT_WINDOW permission https://wajahatkarim.com/2020/04/what-happened-to-chat-bubbles/
users give an app access to the device microphone, camera, or location, just that one time • Permissions auto-reset ◦ Android 11 will “auto-reset” all of the runtime permissions of the app if its not used for a while (e.g. 3 months) • Background location ◦ Developers will need to get approval to access background location in their app to prevent misuse
{ view, insets -> // See if the IME is visible val imeVisible = insets.isVisible((WindowInsets.Type.ime())) if (imeVisible) { val imeInsets = insets.getInsets(WindowInsets.Type.ime()) // ... } }
val reasonsList = activityManager.getHistoricalProcessExitReasons( packageName, pid /* 0 for all matches */, max /* 0 for all */) for (info in reasonsList) { // Log/store/upload info.reason // REASON_LOW_MEMORY, REASON_CRASH, REASON_ANR, etc. }