-
Notifications
You must be signed in to change notification settings - Fork 0
Instant App
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).
Creating an instant app requires version 3.0 minimum of Android Studio.
See all prerequisites in the official documentation: https://developer.android.com/topic/instant-apps/getting-started/index.html
A “basic” instant app is composed of three modules: the instant app module (Instant app module), the app module and the base feature (see https://developer.android.com/topic/instant-apps/getting-started/structure.html).
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).
The build.gradle file :
- Integration of the library in JAR format
apply plugin: 'com.android.feature'
android {
compileSdkVersion 26
defaultConfig {
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
// If this block doesn't exists, add it
repositories{
maven {
url "https://dl.bintray.com/atinternet/maven/"
}
flatDir {
dirs 'libs'
}
}
dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
implementation project(':base')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
- Integration of the library in AAR format
apply plugin: 'com.android.feature'
android {
compileSdkVersion 26
defaultConfig {
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
// If this block doesn't exists, add it
repositories{
maven {
url "https://dl.bintray.com/atinternet/maven/"
}
flatDir {
dirs 'libs'
}
}
dependencies {
api fileTree(dir: 'libs', include: ['*.aar'])
implementation project(':base')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
- Integration of the JCenter dependency
apply plugin: 'com.android.feature'
android {
compileSdkVersion 26
defaultConfig {
minSdkVersion 23
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
// If this block doesn't exists, add it
repositories{
maven {
url "https://dl.bintray.com/atinternet/maven/"
}
flatDir {
dirs 'libs'
}
}
dependencies {
implementation project(':base')
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
api 'com.atinternet:Tracker:2.x.x'// >= 2.0.6
}
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.
The addition of authorisations must be done in the AndroidManifest.xml file of the base feature module.
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
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.
Last update: 11/12/2017
-
Data API
- Data flow
- Advice optimizations data flow
- Error codes data flow
- Faq data flow
- General information data flow
- Technical information data flow
- Reporting API v3
- Getting started
- Methods
- Parameters
- Technical information
- REST API
- Campaigns
- Custom variables
- Getting started rest
- Methods rest
- Response structure parameters rest
- Fixed periods
- Parameters compatibility
- Relative periods
- Structure of the response
- “code” parameter
- “columns” parameter
- “evo” parameter
- “filter” parameter
- “include” parameter
- “lng” parameter
- “max-results” parameter
- “page-num” parameter
- “period” parameter
- “period” parameter: “H” v. “He” & “MN” v. “MNe”
- “retention” parameter
- “segmentdesc” parameter
- “segment” parameter
- “sep” parameter
- “sort” parameter
- “space” parameter
- Technical specifications rest
- Data flow
-
Data collection
- Android
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Users
- Apple
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Users
- General
- Cddc renew staging process
- Changelog
- Craft your hit
- Encoded parameters
- Server side cookie management
- Supported taggings
- Tagging deletion
- Utilisation of dispatch sdks
- JavaScript
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Partners javascript
- Users
- Piano Analytics
- Event tagging piano analytics
- Getting started piano analytics
- Piano analytics tagging
- Feeding piano analytics with as2 tagging
- Tagging custom properties sdk
- Android

