Slide 1

Slide 1 text

What’s new in #AndroidDev Jomar Tigcal Android Developer, Trainer, Consultant

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

Android 11

Slide 4

Slide 4 text

Conversations Conversation Notifications Section ● Open as Bubble ● Create Home Screen Shortcut ● Change Priority

Slide 5

Slide 5 text

Conversations val style = NotificationCompat.MessagingStyle(person) .addMessage(...). ... NotificationCompat.Builder(this, "notif") .setShortcutId(shortcutInfo.id) ... .build() val person = Person.Builder().build() val shortcutInfo = ShortcutInfoCompat.Builder(this, "sample") .setPerson(person) .setLongLived(true) ... build() ShortcutManagerCompat.pushDynamicShort cut(shortcutInfo)

Slide 6

Slide 6 text

Bubbles Keep conversations while multitasking Alternative to SYSTEM_ALERT_WINDOW Notification API Developer Preview in Android 10

Slide 7

Slide 7 text

Bubbles val bubbleMetadata = Notification.BubbleMetadata.Builder(shortcu tInfo.id) NotificationCompat.Builder(this, "notif") .setBubbleMetadata(bubbleMetadata) .setShortcutId(shortcutInfo.id) ... .build() https://d.android.com/guide/topics/ui/bubbles

Slide 8

Slide 8 text

Quick Access Device Controls Long pressing Power button: ● Payment Methods ● Smart Home Controls Add your own: ControlsProviderService https://d.android.com/preview/features/device-control

Slide 9

Slide 9 text

New Media Controls near Quick Settings Carousel for multiple apps Output Picker to switch output device Beta 1: toggle Media resumption at Settings -> System -> Developer options https://d.android.com/preview/features/media-controls

Slide 10

Slide 10 text

Other UI Changes 5G visual indicators Voice Access now understand screen content and context Hingle Angle API for Foldables DisplayCutout for curved/waterfall displays New Emojis and more... Consolidated keyboard suggestions Keyboard/IME Animation (WindowInsets) Screen Recorder App Suggestions on Home Screen Recents (Screenshot, Select, Share) New Screenshot UI Notification History

Slide 11

Slide 11 text

Android 11 SDK: Android SDK Build Tools 30 build.gradle: ● compileSdkVersion 30 ● targetSdkVersion 30 https://developer.android.com/preview

Slide 12

Slide 12 text

One-Time Permissions Permissions: ● Microphone, Camera, Location While in use and in foreground

Slide 13

Slide 13 text

Permissions auto-reset Targets Android 11 Unused for long period of time Auto-reset and notify Settings.ACTION_APPLICATION_DETAILS_SETTINGS

Slide 14

Slide 14 text

Phone Permissions READ_PHONE_NUMBERS instead of READ_PHONE_STATE for: ● TelephonyManager.getLine1Number ● TelecomManager.getLine1Number

Slide 15

Slide 15 text

Background Location Targets Android 11: Request Foreground Permission, then Request Background Permission * Educate/Explain * Open App Settings Approval for background access by 2021

Slide 16

Slide 16 text

Foreground Service Types Targets Android 11: New Types (Camera and Microphone) ...

Slide 17

Slide 17 text

Package Visibility Target Android 11: Can no longer query installed apps must declare packages in manifest ● Specific package ● Intent Filter All apps: android.permission.QUERY_ALL_PACKAGES (Guideline soon…)

Slide 18

Slide 18 text

restricted non-SDK interfaces non-SDK test APIs (@TestApi) now restricted by default greylist in Android 10 (API level 29) that are now restricted in Android 11 greylist in Android 10 (API level 29) that were added to the Android SDK (whitelist) in Android 11 https://d.android.com/distribute/best-practices/develop/restrictions-non-sdk-interfaces

Slide 19

Slide 19 text

Scoped Storage scoped access into external storage Introduced in Android 10; Mandatory in Android 11 Storage permission renamed to Files & Media File Path Access: requestLegacyExternalStorage true Bulk media edit access: createWriteRequest, createDeleteRequest, createTrashRequest, createFavoriteRequest All Files Access: MANAGE_EXTERNAL_STORAGE ,Google Play manual review

Slide 20

Slide 20 text

Data Access Auditing Provide more transparency into how app and its dependencies are accessing private data AppOpsManager.AppOpsCollector callbacks invoked when user-permission-required data is accessed Attribute access to logical features within the app

Slide 21

Slide 21 text

Developer Options > Wireless debugging Pair with Code ● Linux/Windows: adb connect ipaddress:port ● Mac: adb pair pairingCodeIpAddress:port Pair with QR: Soon in Android Studio Wireless Debugging

Slide 22

Slide 22 text

For faster installs of large APKs Sign your APK with the new APK Signature Scheme v4 format adb install --incremental * Pixel 4, device launching with Android 11 ADB Incremental

Slide 23

Slide 23 text

ActivityManager.getHistoricalProcessExitReasons() //List ApplicationExitInfo.getReason() ● REASON_ANR ● REASON_CRASH ● REASON_DEPENDENCY_DIED ● REASON_LOW_MEMORY ● REASON_UNKNOWN ● ... Crash Reasons

Slide 24

Slide 24 text

Others

Slide 25

Slide 25 text

Link App Compatibility Changes System > Advanced > Developer options Without changing targetSdkVersion Debuggable app Toggle one or more features to focus testing Default Enabled Changes (all apps on 11) Default Disabled Changes (Experimental) Enabled for targetSdkVersion

Slide 26

Slide 26 text

Modern Android Development Kotlin Android Jetpack Android Studio Android App Bundle https://developer.android.com/modern-android-development

Slide 27

Slide 27 text

Android App Bundle Official publishing format Reduce app size Efficient release process Dynamic Feature App Signing by Google Play Required for new apps in 2021 https://g.co/androidappbundle

Slide 28

Slide 28 text

Kotlin ● 70% of top 1k Android apps ● 60% of Pro Android Developers ● 55 Google apps ● Coroutines Officially Recommended ● @RecentlyNullable, @RecentlyNonNull to @Nullable and @NonNull ● New @RecentlyNullable, @RecentlyNonNull ● Kotlin-first libraries https://developer.android.com/kotlin

Slide 29

Slide 29 text

Jetpack New Android Jetpack Libraries: ● Hilt: dependency injection (DI) library ● App Startup: initialize components at application startup ● Paging 3: load and display data incrementally + Updates to existing libraries https://developer.android.com/jetpack

Slide 30

Slide 30 text

Jetpack Compose Android’s modern toolkit for building native UI Kotlin-based Reactive Developer Preview https://developer.android.com/jetpack/compose

Slide 31

Slide 31 text

What’s New in Android Studio Android Studio 4.0 Stable Android Studio 4.1 Beta Android Studio 4.2 Canary

Slide 32

Slide 32 text

Android Studio 4.0 Stable Motion Editor Live Layout Inspector Layout Validation Build Analyzer Java 8 library desugaring in D8 and R8 Dynamic Feature Dependency Support for Kotlin DSL script files CPU Profiler upgrades R8 Rules Editing Kotlin Android live templates

Slide 33

Slide 33 text

Android Studio 4.1 Beta Database Inspector Android Emulator in Android Studio Material Design Components Dagger Navigation support Native Memory Profiler Faster Apply Changes

Slide 34

Slide 34 text

Android Studio 4.2 Canary Wireless ADB Debugging with Android 11 Jetpack Compose ConstraintLayout Visualization Parallel Instrumentation testing Test Failure Retention

Slide 35

Slide 35 text

New Google Play Console (Beta) ● Google Material Design, Responsive ● New Navigation grouping: Release, Grow, Quality, Monetize ● Policy Section: Policy Status, App Content ● Rolling out Soon: Inbox ● User management and Permissions https://play.google.com/console

Slide 36

Slide 36 text

Google Play Console (Beta): Release ● Internal Testing ● Public Testing (Closed/Open) ● Pre-launch Report ● Launch (Production/Pre-registration) ● Device Catalog ● App bundle explorer ● App Signing ● Advanced Settings

Slide 37

Slide 37 text

Google Play Console (Beta): Quality ● Android Vitals ● User feedback -> Ratings and reviews

Slide 38

Slide 38 text

Google Play Console (Beta): Grow ● Acquisition analysis page ● Store listing conversion analysis page ● Simplified store listing page ● Store listing experiments ● New store settings page (category, contact, external marketing) ● Translation services for localization

Slide 39

Slide 39 text

11 Weeks of Android https://goo.gle/11-Weeks-Android

Slide 40

Slide 40 text

Week 1: People & Identity ● Blog Post: https://android-developers.googleblo g.com/2020/06/11-weeks-of-android- people-identity.html ● Videos: https://goo.gle/people-identity ● Pathway: https://d.android.com/courses/pathw ays/android-week1-people-identity

Slide 41

Slide 41 text

Week 2: Machine Learning TensorFlow Lite, TF Hub, MLKit ● Blog Post: https://goo.gle/MLWrap ● Videos: https://goo.gle/ml-11weeks ● Pathway: https://goo.gle/MLPath

Slide 42

Slide 42 text

Resources ● Android 11 Beta Launch: https://developer.android.com/android11 ● Android 11 Preview: https://developer.android.com/preview ● Android 11 Videos: https://goo.gle/android11 ● 11 Weeks of Android: https://goo.gle/11-Weeks-Android ● 11 Weeks of Android Videos: https://goo.gle/android-11weeks ● 11 Weeks of Android Pathways: https://goo.gle/3dwqDGy ● Android 11 Meetups: https://d.android.com/android11/meetups

Slide 43

Slide 43 text

Questions? ?

Slide 44

Slide 44 text

Thank you! Build something awesome! Provide feedback: talkback.tigcal.com https://www.tigcal.com [email protected] @jomartigcal medium.com/@jomartigcal

Slide 45

Slide 45 text

What’s new in #AndroidDev Jomar Tigcal Android Developer, Trainer, Consultant