GDG Lahore This is Wajahat Karim! - Google Developer Expert 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
GDG Lahore Credits: InfoTechNews Chat Bubbles ● Help users to 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/
GDG Lahore Credits: Android Central Autofill Keyboard ● Lets Autofill apps and Input Method Editors (IMEs) like Keyboards securely offer context-specific entities and strings directly in an IME’s suggestion strip.
GDG Lahore Credits: 9to5google Media Resumptions ● Control panel-esque setup embedded directly at the top of your screen ○ Used to be clustered between notifications ○ Only accessible through Developer Options for now
GDG Lahore ● Picture-in-Picture displays can be resized ○ Such as Google Maps navigation ○ YouTube videos ○ Video Calls Credits: 9to5google Resizable Picture-in-Picture
GDG Lahore Credits: VentureBeat Permissions ● One-time permissions ○ lets 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
GDG Lahore WindowInsets // get WindowInsets object from listener view.setOnApplyWindowInsetsListener { view, insets -> // See if the IME is visible val imeVisible = insets.isVisible((WindowInsets.Type.ime())) if (imeVisible) { val imeInsets = insets.getInsets(WindowInsets.Type.ime()) // ... } }
GDG Lahore ● More restrictive in Android 11 ● First, request foreground permission ● Then request background permission ● Takes user to Settings Background Location
GDG Lahore Crash Reasons Querying // Returns List of ApplicationExitInfo 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. }