What's New in Android 11 for App Developers - An Overview
After a series of beta updates, Google officially released its much awaited OS version – Android 11, on September 8, 2020. Though there are not many far-reaching changes in the newer version, there are some great features that will benefit both developers and users alike.
In this article, we have collated the main updates/features and APIs of Android 11 that app developers need to know, for creating new apps and for updating the existing ones.
Main Features
Device and Media Controls
Connected smart devices like thermostats, lamps, locks, etc. can now be accessed and controlled in Android 11 using templated widgets.
Image Source: Google
Similarly, media can be controlled easily from the Quick Settings panel that allows swiping and resuming playback from other devices (like headphones, speakers, etc.) and apps.
To know more about developing Device Controls widgets, click here. If you want Media Controls support in your app, check out this Google documentation.
Message Notifications
Android 11 has redefined messaging experience with the implementation of conversation bubbles (similar to Facebook Messenger’s Chat Heads) and “people-centric” conversation notifications and shortcuts.
So, developers can add the necessary APIs for integrating these features on messaging and chat apps.
One-time & Auto-Reset Permissions
Keeping in line with user privacy, Android 11 has introduced ‘one-time permissions’ where users can allow apps to access camera, microphone and location for just a single time. That means, the next time, for accessing the same, the app has to again ask the user’s permission.
Also, the permissions granted for unused apps (remaining idle for a longer period of time) will be auto-revoked. Hence, to comply with these changes, developers must ensure that their apps are following the best practices for requesting runtime permissions.
Background Location Access
In Android 11, if a feature in your app needs access to a user’s background location, then first it has to ask access for foreground location; i.e. the real-time location of the user (as seen in navigation apps) after which the user is taken to the Settings to grant the permission.
So, ensure that the permission flow in your app is updated for accessing background location.
BiometricPromptAPI
Another important feature is the introduction of a new API – the BiometricPromptAPI that helps developers to define the level of biometric authentication that their app can support for accessing sensitive data.
Developer-Friendly Features
More Kotlin Nullability Annotations
With its in-built nullability feature, Kotlin is becoming the favorite language of Android developers. The latest Android version adds explicit nullability annotations to variables and methods. This will help in spotting and removing nullability issues in the build time itself.
ADB Incremental for APK Installs
Now, installing large-sized (above 2 GB) APKs via Android Debug Bridge (ADB) will no longer be a headache for developers as ADB Incremental will install APKs in much lesser time, thus increasing developer productivity.
App Compatibility Tools
Testing and debugging of the app is made easier with a set of compatibility tools that will allow developers to manually enable or disable behavioral changes introduced in Android 11 platform. This helps in testing each component at the granular level or all together to check if any breaks will occur.
Data Access Auditing
With the help of this feature, developers can figure out how their apps access personal data of users and rectify any potential data breaches.
App Exit Reasons API
An app crashing for no known reason is certainly a nightmare for any developer. With the getHistoricalProcessExitReasons API, one can view and analyze the reasons for the sudden exit of the app across devices, memory configurations or user scenarios.
These are just some of the striking features and new APIs introduced in Android 11. To learn about the remaining ones, click here.
Conclusion
Android apps capture more than 70% of the market share, and this number will only increase in the coming years. Hence, businesses can leverage the power of Android 11 by hiring skilled Android app developers to build customized, innovative mobile apps.