Instant App

Foreword

Before getting started, you’ll need to download our SDK via the Tag Composer tool by logging into your AT Internet account, or by using the SDK dependency available in JCenter (refer to the documentation on integrating the library).

Integration in Android Studio

Library

The principle of integration is the same as with a standard application. Only the destination changes, since in order to integrate the library into your project, you must copy it to the folder called “MyProject/feature/libs” in the base feature module, this module contains (among other things) the resources shared between the instant app and app modules.

After having synchronised your project (Sync Project with Gradle Files), open the build.gradle file in the base feature module (feature in this example).

Instant app best practices would suggest reducing overall module size (including the “libs” file with archives). It’s therefore preferable for the user to load the library in JAR format which is lighter.
It should nonetheless be noted that, in this case, it won’t be possible to enable Live Tagging or the Debugger which require graphic resources only present in the AAR-format archive.

The Live Tagging and Debugger features are not available on instant app-type modules, notably due to limitations in terms of Android permissions (not possible to use the permission on the overlay: “android.permission.SYSTEM_ALERT_WINDOW”). Please see https://developer.android.com/topic/instant-apps/faqs.html for more details.

Authorisations

The addition of authorisations must be done in the AndroidManifest.xml file of the base feature module.

Tagging

Tagging must be added in the activity of the feature(s) in question based on the project’s structure.
According to Android documentation FAQ: “All the network traffic from inside instant apps must use HTTPS. Instant apps does not support HTTP.” (see https://developer.android.com/topic/instant-apps/faqs.html).

The Tracker’s secure mode must be enabled (with secure log) to allow hits to be sent on an instant app.