Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What's New in #AndroidDev

What's New in #AndroidDev

My talk at the GDG Philippines Android 11 Meetup (https://www.youtube.com/watch?v=d_OmJ8akJWc) on June 27, 2020

Jomar Tigcal

June 27, 2020
Tweet

More Decks by Jomar Tigcal

Other Decks in Technology

Transcript

  1. 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)
  2. 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
  3. 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
  4. 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
  5. Android 11 SDK: Android SDK Build Tools 30 build.gradle: •

    compileSdkVersion 30 • targetSdkVersion 30 https://developer.android.com/preview
  6. Permissions auto-reset Targets Android 11 Unused for long period of

    time Auto-reset and notify Settings.ACTION_APPLICATION_DETAILS_SETTINGS
  7. Phone Permissions READ_PHONE_NUMBERS instead of READ_PHONE_STATE for: • TelephonyManager.getLine1Number •

    TelecomManager.getLine1Number <uses-permission android:name="READ_PHONE_STATE" android:maxSdkVersion="29" /> <uses-permission android:name="READ_PHONE_NUMBERS" />
  8. Background Location Targets Android 11: Request Foreground Permission, then Request

    Background Permission * Educate/Explain * Open App Settings Approval for background access by 2021
  9. Foreground Service Types Targets Android 11: New Types (Camera and

    Microphone) <manifest> ... <service ... android:foregroundServiceType="camera|microphone" /> </manifest>
  10. 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…)
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. Modern Android Development Kotlin Android Jetpack Android Studio Android App

    Bundle https://developer.android.com/modern-android-development
  18. 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
  19. 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
  20. 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
  21. Jetpack Compose Android’s modern toolkit for building native UI Kotlin-based

    Reactive Developer Preview https://developer.android.com/jetpack/compose
  22. What’s New in Android Studio Android Studio 4.0 Stable Android

    Studio 4.1 Beta Android Studio 4.2 Canary
  23. 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
  24. Android Studio 4.1 Beta Database Inspector Android Emulator in Android

    Studio Material Design Components Dagger Navigation support Native Memory Profiler Faster Apply Changes
  25. Android Studio 4.2 Canary Wireless ADB Debugging with Android 11

    Jetpack Compose ConstraintLayout Visualization Parallel Instrumentation testing Test Failure Retention
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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