Google I/O ‘22 - What is new?

Updates in jetpack

Latest Jetpack libraries will help in implementing android opinionated guidance and handle backwards compatibility. Jetpack has over 120 libraries now..

  • Jankstats Library

From updates to existing libraries to brand new libraries. The new jankStats library helps you to track and analyze performance problem in your app

  • Baseline Profiles

To make your app load faster and reduce dropped frames the first time a user interacts with your app android release new baseline profiles.

  • Provides custom profile rules in apps and libraries

  • Startup and jank performance improvements 

  • Profiles to popular Jetpack libraries

  • Room

Existing libraries got a lot of updates as well. Room 2.5 brings the initial stages of a full kotlin, rewrite stable support for KSP and relational query methods. 

  • Navigation Library

With the latest navigation library you can support multiple back stacks without any codes changes and easily implement a two pane layout.


Fragments

One of the first ever android support libraries was fragments. A Lot of people hate it and love it as well. Fragments today have changed significantly. All the Responsibilities that belong to Fragments before are now handled by separate purpose-built classes. APIs have been deprecated for separate testable classes for example APIs that look like lifecycle methods have been deprecated in favor of Androidx Lifecycle. 

To pass information from one fragment to another use Fragment Results API, which is under the hood uses Lifecycle APIs, this helps to write a code which is easy to test using fragment scenarios and test lifecycle owner. 

Compose

One of the latest Jetpack libraries is Compose (Android modern declarative UI toolkit). Compose beta 1.2 was just released continuing to bring the APIs you need to support more advanced use cases, like downloadable fonts, nested scrolling interop and more tooling support with features like Live Edit , recomposition debugging and animation preview.

Lazy grids

Lazy grids have recently been reworked with new capabilities and Api graduated from experimental in Compose 1.2. Lazy grids allow you to work with a fixed number of columns or work with adaptive sizing, making your UI look just right across different screen sizes.You can even go completely custom , where you can define how to compute the number and size of columns including having non standard dimensions for certain items.

Large Screens

Whether you are working on an existing app or developing a new application from scratch there are an increasing number of devices your app can run on, with screen sizes ranging from the smallest phones to foldables to the large tablet to laptops.

There are series of large screens layout that are called canonical layouts. There are three of them list detail layout , which uses two columns one for a list or a group of items and the other one is a detailed view.

You also need to find the right threshold at which to change your UI. So , they define new breakpoint values that help you classify devices into predefined size classes compact , medium and expanded. Jetpack WindowManager 1.1  provides window size classes, APIs to provide these predefined window sizes , which you can use to adapt your UI based on the available space. 

Android 13

Android 13 beta 2 is now available, evolving the platform to make it even more powerful , safe , and secure.  

  • In “Developing Privacy User-Centric Apps”, how apps are accessing sensitive information and show how you can access data or permissions.

  • It introduced new permission for posting notifications and deprecates read_external_ storage permission.

  • It  brings a brand new photo picker , which lets users select media files without needing to grant your app access to their entire media library; no permission is needed at all.

  • It introduce new APIs to revoke permissions if you no longer need them such as after removing a feature or a one-time access 

Machine Learning in Android

Machine learning continues to progress and enable new user experience in your app. Using MLKit , Android mobile ML SDK or going custom with the help of Android’s custom ML stack.

MLKit updates many of its APS’s such as real time pose detection, face detection, digital ink handwriting , improving accuracy , latency and reducing SDK sizes.Its text recognition API can now support 37 languages , representing 4.9 billion people worldwide. They are also launching a brand new Google Code Scanner feature in Google Play Services to make it more easy to scan barcodes , QR codes , and other codes without need for the camera permission.For improvement of custom ML stack, Android introduces new APIs for hardware acceleration and updatable drivers. Tensorflow runtime is now available via Google Play Services.

Android Camera

Android continues to invest in the CameraX Library as the way to work with cameras. Android is working with OEMs, providing a test suite to ensure consistent support and operating android own test lab, verifying behavior and adding compatibility fixes.

CameraX version 1.1 is now RC, adding video capture with dropping WYSIWYG camera controls.Video capture supports camera selection , optional audio, and resolutions from SD to 4K depending on the device. 

Android 13 introduces HDR video capture CameraX backports this, as well as new preview stabilization and jitter reduction.

Android Media

With more devices supporting HDR videos, it's important to include HDR capture or import in your apps or properly transcode to SDR. Android 13 standardizes the required HDR formats for capture and playback, with updates to Jetpack Media to help with HDR playback, editing and transcoding will come soon.

Android 13 adds spatial audio support and ExoPlayer 2.17 configures the device for spatial audio by default.Just include multichannel audio tracks in your content. ExoPlayer also added DRM key prefetching, better Android 12 compatibility for background downloads and server-side ad insertion.

Android continues the process of migrating from ExoPlayer to Jetpack Media3. Jetpack Media3 goes beyond playback use cases; for example , providing support for editing and transcoding media.


Google Wallet API

The new Google Wallet Api gives you fast , secure access to your everyday essentials.For event tickets , boarding passes to vaccine cards you can now store anything in Google Wallet.  Android evolved the previous Google Pay Passes API, now called Google Wallet API to make it easier to save items to Google Wallet. 

Android introduced a new Android SDK which allows you to save passes directly from your app without a backend integration and continue to support all the existing pass types, by adding new generic cards allowing you to save anything not covered by the existing pass types such as membership cards reservations , or vouchers.

Android also adding the ability to group multiple passess togather for example , grouping an event ticket with a voucher. Existing Pay Passess Api integration will continue to work.

Google Play

The Play Console helps you to monitor and prioritize app quality issues and then act to fix them. To monitor your app , use Android Vitals. It shows issues with the same quality data that Play Store uses.

Vitals now offers a reporting API, enabling you to extract data to build your own dashboards and workflows.Vital has also added the ability to explore or filter issues by country. You can link your issues with crashlytics to see Play track information and Vitals data directly into crashlytics. Issues are also aligned issue labels with Crashlytics to make it easier to work across both products. New tools help you to prioritize which issues to address.

New devices tools help you to Slice and dice by device specs , country , vital statistics , and revenue  to find out where to focus your efforts.

Google Play also revamped the Device Catalog, showing more details of device models and specs and offering new dynamic filters.

You can now use Custom store listings with deep links , have up to 50 listings , have finer control over A/B tests, have forecast time to complete experiments, faster results and continuous monitoring.

LiveOps , in beta, enables you to show in-app content across the Play Store to drive user engagement. This year Android launched a new LIveOp type called “Offers” And reporting for LiveOps within the Play Console.

WearOS

To create beautiful , power-efficient apps for WearOS Compose support now reached beta, making it fast and easy to build beautiful Material Design apps. WearOS upgraded the Health Services APIs to help you build power-efficient health and fitness apps across different underlying hardware, allowing you to focus on building your app. WearOS provides APIs for common tasks like workout tracking, collecting all-day health metrics, high fidelity, instantaneous measurements of metrics like heat rate. 

Health Connect will bring together Google fit , Fitbit , and Samsung Health into one consolidated Android Api to read and write an on-device datastore with user’s consent. Health connect is now in alpha through the Jetpack Health API and launches for users this fall.

Previous
Previous

Why is Retail Mobile App useful for your business?

Next
Next

eHome - Ett hem, Flera enheter - En app