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

What is new in Android 10 - A developer preview

Arnav Gupta
October 06, 2019

What is new in Android 10 - A developer preview

A run through of new APIs and features and deprecations in Android from a developer's standpoint.

Arnav Gupta

October 06, 2019

More Decks by Arnav Gupta

Other Decks in Technology


  1. Android 10 September 3, 2019 First numerical Android release, without

    any desert names. Originally called Android Q
  2. Smart Reply Auto suggestions to reply to texting apps, powered

    by the engine that supports smart suggestions on Gmail
  3. Live Captions Machine Learning powered live captioning of any video

    you are watching, even it did not have subtitles.
  4. Dark Mode New dark mode support, for most apps, helps

    reduce battery drain on OLED phones.
  5. Digital Wellbeing Check app usage, turn on focus mode to

    disable distracting apps, mute notifications.
  6. Privacy Android 10 has a focus on improving users’ privacy,

    which means apps must adapt to new restrictions • Scoped Storage • Foreground-only location • Background execution limits • Access to unique ids like IMEI • Wifi/BT scanning
  7. Scoped Storage • Android 10 doesn’t allow apps to access

    entire SD Card ◦ Used “scopes” like PICTURES, MUSIC, MOVIES etc ◦ Apps can only see files within a scope • File Managers, as we know them, might cease to exist • Legacy support, for the time being ◦ requestLegacyExternalStorage in Android Manifest
  8. Background location • New permission ACCESS_BACKGROUND_LOCATION • For older apps,

    OS automatically adds permission if FINE/COARSE location requested. • Must be explicitly added for targetSdk = 29 • Without this permission, location works only in activities and foreground services
  9. Restrictions on background start • Old way ◦ Send intent

    with FLAG_ACTIVITY_NEW_TASK from service to start activity. • New Way ◦ Display time sensitive notifications with pending intent to activity ◦ User can swipe away notification, or click it – which opens activity. ◦ Even time-sensitive notifications are subject to DND rules. • Exceptions ◦ If app already is in foreground, or has a recent task open. ◦ App is device policy manager.
  10. Clipboard Data Limitations • You cannot access clipboard via ClipboardManager

    • Only app that is currently default set IME (keyboard) has access to last clips on clipboard. • Users can only explicitly paste data into your app
  11. Reading IMEI / MAC • Only apps with READ_PRIVILEGED_PHONE_STATE can

    read IMEI • Submitting apps with READ_PRIVILEGED_PHONE_STATE to Play Store not allowed. • Device Admin apps, and apps with carrier permissions (SIM card apps) can still access • MAC address is now randomized. Device Admin apps can still read actual MAC address.
  12. Toggling WiFi and reading saved networks • Your app cannot

    toggle WiFi ◦ WifiManager.setWifiEnabled() returns false always • To nudge the user to turn on Wifi, send him to Settings app or use a Setttings panel (more on this later). • Apps cannot read any information about saved networks, nor can they connect/reconnect/disable/forget saved networks.
  13. Physical Activity Recognition • To read step counter and step

    detector, new permission needed ◦ ACTIVITY_RECOGNITION • Accessing data indirectly from apps like Google Fit will also need the same permission
  14. Biometric Prompt § A new BiometricManager with BiometricPrompt § Check

    if device has biometrics § Available via androidx.biometric support library. § Supports face, fingerprint, IRIS and other mechanisms
  15. Audio Input Sharing • Earlier only one app could read

    an audio source • From Android 10, multiple apps can plug into the same audio source. • Easier to make apps like call-recorder.
  16. Notification Seekbar § Media notifications can have seekbar § Useful

    for Music apps § Can be display-only, or also drag-to-seek
  17. Dynamic Depth Format Use depth information in a new open

    dynamic depth format. Apps can use that information to post process (add/remove bokeh) from the photos.
  18. HEIC support • High efficiency image file/codec (HEIF/HEIC) support •

    All Android 10 devices can record video in HEIC • All Android 10 devices can seamlessly and transparently read HEIC files.
  19. Settings Panels § A new API to show a popup

    to users to toggle certain settings. § Android 10 doesn’t allow apps to directly change BT, Wifi etc states. § Apps can nudge a user by showing a settings panel.
  20. Sharing Shortcuts API § Android Direct Share API is really

    old, and had become very slow if multiple apps installed. § It used to query all sharing intents at runtime and the dialog would take time. § Sharing Shortcuts API makes it much faster.
  21. Android OS improvements § ART performance has improved. § On-Device

    TensorFlow support is better with Neural Networks API 1.2 § Thermal API for apps to check device heat-up and mitigate it.
  22. Step 1 • Make sure your current app works on

    Android 10 • Get an Android 10 emulator or Android 10 device (Oneplus/Pixel for now) • Check everything works on your app
  23. Step 2 • Set compileSdk to 29 and targetSdk to

    29 • Make changes as per new APIs • Build app and check new and changed features. • Release update.
  24. Thank You! Any questions ? twitter - @championswimmer github –

    championswimmer speakerdeck.com/championswimm er email: [email protected]