top of page
Writer's pictureDon Peter

What's new for developers in Android 12

Android released its OS version 12 developer preview back in February and is currently in beta 3. The expected date of stable release is in August or September.


Let us take a look at the new capabilities and features that developer can leverage.


Material UI gets an upgrade - Material You

Material You helps developers make design personal for app users. App users can tailor UI and design elements like color to their choice. This revolutionizes the entire concept of app design. Irrespective of the type of device, users will be able to interact and use apps in a familiar User Interface.


Representational image for Material You design.
"Material You" Image Copyright: material.io

Google is yet to open up the APIs for developers. Hence the actual implementation and backward compatibility details are not yet verified.


New API for In-App searching

In Android 12, A document based NoSQL implementation has been introduced. Developers are provided with AppSearch API to store, index, search, share data.

Pictorial depiction of how local storage and platform storage works in appsearch
Basic structure of LocalStorage and PlatformStorage in AppSearch

  • AppSearch comes bundled as part of androidx jetpack library which makes it backward compatible.

  • AppSearch comes with LocalStorage and PlatformStorage support.

  • LocalStorage is an in-app NoSQL implementation.

  • PlatformStorage is a centralized NoSQL implementation that can be used to share data across apps.

  • LocalStorage supports Android 4 and above.

  • PlatformStorage supports Android 12 and future versions.


Privacy Indicator API in WindowInsets

OS will display privacy indicators in status bar of the device. The indicators are shown whenever the device camera or microphone is active. Developers can make use of getPrivacyIndicatorBounds API in WindowInsets to adjust the app interface accordingly so as not to overlap with privacy indicators.


Foreground permission for CDM paired apps

A new foreground permission is added to enable CDM or Companion Device Pairing apps to start foreground services. The name of the permission is REQUEST_COMPANION_START_FOREGROUND_SERVICES_FROM_BACKGROUND.


Game Mode API

Game developers can adjust game play settings based on the value from game mode API. Game Mode API is available in GameManager. It has the following game modes.


UNSUPPORTED mode

The game does not support Game Mode API.


STANDARD mode

The user has not yet selected any game modes. The game settings may remain as it is.


PERFORMANCE mode

User has selected performance mode. Game may adjust its settings to provide lowest latency frame rates even though the battery life may be affected.


BATTERY mode

User has opted for better battery life mode. Game need to adjust its settings to provide longest battery life possible during game play.


Conclusion

One of the impactful feature added is NoSQL based AppSearch. This gives developers the ability to implement efficient search functionality.


Why don't you give it a try?

Comments


Blog for Mobile App Developers, Testers and App Owners

 

This blog is from Finotes Team. Finotes is a lightweight mobile APM and bug detection tool for iOS and Android apps.

In this blog we talk about iOS and Android app development technologies, languages and frameworks like Java, Kotlin, Swift, Objective-C, Dart and Flutter that are used to build mobile apps. Read articles from Finotes team about good programming and software engineering practices, testing and QA practices, performance issues and bugs, concepts and techniques. 

Monitor & Improve Performance of your Mobile App

 

Detect memory leaks, abnormal memory usages, crashes, API / Network call issues, frame rate issues, ANR, App Hangs, Exceptions and Errors, and much more.

Explore Finotes

bottom of page