Jichao Li, software engineer; Shobana Ravi, Software Engineer

Since our public
launch to Google I / O, we worked hard to improve the developer
experience creating instant applications. Today, we are delighted to announce
the availability of the Android Instant Apps SDK 1.1 with some very requested
features such as enhanced NDK support, APK configuration for binary size
reduction, and a new API to maintain the context of the user during the transition of a
instant application to the installed application.

Presentation of configuration APKs

For an exceptional instant experience, the binaries of applications must be thin and well
structure. That’s why we introduce configuration APKs.

Configuration APKs allow developers to isolate device-specific resources and
native libraries in independent APKs. For an application that uses
APK, the Android Instant Apps framework will only load the
native resources and libraries relevant to the user’s device, thereby reducing
the total size of the instant application on the device.

We currently support setup APKs for display density, CPU architecture
(ABI), and the language. With these, we saw an average reduction of 10% in the
size of loaded binaries. Actual savings for a given application depend on the number
resource files and native libraries that can be configured.

For example, a user on an ARM device with an LDPI screen density and a language set
to Chinese would then receive the agnostic code and the device resources, then only
get setup APKs that have native ARM libraries, the Chinese language,
and LDPI resources. They would not receive any other configuration APKs
such as x86 libraries, Spanish language channels, or HDPI resources.

Configuring configuration APK files for your application is a simple change to your gradle
install. Just follow the steps of our audience
documentation .

Persistent user context after installation

On Android Oreo, the internal storage of the instant version of the application is
directly available for the installed version of the application. With this version of
SDK, we enable this feature on older versions of the Android
Frame, including Lollipop, Marshmallow and Nougat devices.

To extract the internal storage from the instant application, installed applications can now call
InstantAppsClient.getInstantAppData ()
using the API of Google Play’s instant apps services and get a ZIP file of
internal storage of the instant application.

Check out our code sample and
for more details on the use of this API.

Start creating your Android instant app

It’s easy to start creating your instant app on the latest SDK. Just open the
SDK Manager in Android Studio and update your Instant Apps Development SDK
1.1.0. We can not wait to see what instant application experiences you build with these
new features.

Source link


Please enter your comment!
Please enter your name here