A run through of new APIs and features and deprecations in Android from a developer's standpoint.
What’s new in Android 10
A developer’s preview
Mobile Platform Team
Co-Founder & Mentor
September 3, 2019
First numerical Android release,
without any desert names.
Originally called Android Q
Auto suggestions to
reply to texting apps,
powered by the engine
that supports smart
suggestions on Gmail
Native support for in-
built amplifier and
New gestures to go
home and to go back
with smooth animations
powered live captioning
of any video you are
watching, even it did not
Support for multiple
different size screens
and foldable devices
New dark mode
support, for most apps,
helps reduce battery
drain on OLED phones.
Check app usage, turn
on focus mode to
disable distracting apps,
What has changed
for app developers ?
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
● 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
● New permission
● 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
App upgrade location permission table
Unique identifier data masking in Android 10
Restrictions on scanning and metadata
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.
○ If app already is in foreground, or has a recent task open.
○ App is device policy manager.
Foreground Service Types
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
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.
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.
Physical Activity Recognition
● To read step counter and step detector, new permission needed
● Accessing data indirectly from apps like Google Fit will also need the
§ A new BiometricManager
§ Check if device has
§ Available via
§ Supports face, fingerprint,
IRIS and other
Showing BiometricPrompt and handling callback
Wifi Suggestion API
New Wifi P2P Connection Mechanism (lot less code)
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.
§ Media notifications can
§ Useful for Music apps
§ Can be display-only, or
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
● 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
§ A new API to show a
popup to users to toggle
§ Android 10 doesn’t allow
apps to directly change
BT, Wifi etc states.
§ Apps can nudge a user by
showing a settings panel.
Open Settings Panel (really easy one-liner)
§ 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
§ Sharing Shortcuts API
makes it much faster.
Register Sharing Shortcuts in Manifest
§ ART performance has
§ On-Device TensorFlow
support is better with
Neural Networks API 1.2
§ Thermal API for apps to
check device heat-up and
● Make sure your
current app works on
● Get an Android 10
emulator or Android
● Check everything
works on your app
● Set compileSdk to 29
and targetSdk to 29
● Make changes as per
● Build app and check
new and changed
● Release update.
One more thing
Any questions ?
twitter - @championswimmer
github – championswimmer
email: [email protected]