Android integration
Prerequisites
- Android Studio Arctic Fox and above.
- Target API level 19 (Kitkat) or later.
- Android Gradle plugin at least 7.0.0-beta04.
- DataBinding should be enabled in your project.
- Use google's Androidx library instead of the standard or support library.
Getting started
- Before you can add Zoho Apptics to your Android app, you need to create a Project and add your app to the Apptics web.
- Download apptics-config.json, and move the file to your app (module) directory.
Product flavor and build type-specific apptics-config.json
Copied// config in this structure will be applied for all build variants
app/apptics-config.json
// config in this structure will be applied for all APKs with this flavor.
app/src/[product-flavor]/apptics-config.json
// config in this structure will be applied for all APKs with this build-type.
app/src/[build-type]/apptics-config.json
// config in this structure will be applied only for this particular build variant.
app/src/[build-type]/[product-flavor]/apptics-config.json
- In root level (project level) build.gradle, add classpath and maven url for Apptics Plugin.
Copiedbuildscript {
repositories {
maven {
url "https://maven.zohodl.com/"
}
}
dependencies {
classpath "com.zoho.apptics:apptics-plugin:0.1.2"
}
}
- Include the repo URL in the settings.gradle.
CopieddependencyResolutionManagement {
repositories {
maven {
url "https://maven.zohodl.com/"
}
}
}
- Declare the dependencies for the Apptics Modules that you want to use in module-level build.gradle.
Apply Apptics plugin
Add the Apptics plugin in the app-level build.gradle file.
Copiedplugins{
id (“apptics-plugin”)
}
Apptics BOM
Apptics BoM (Bill of Materials) can be used to manage apptics module versions by just specifying the BoM version. A compatible set of each apptics module version will be mapped with the BoM version.
Check the Release Notes to know which apptics module versions are mapped to a specific BoM version.
Copieddependencies {
// ...
implementation platform('com.zoho.apptics:apptics-bom:0.2.5.0')
// no need to mention the versions of apptics modules.
implementation 'com.zoho.apptics:apptics-analytics'
implementation 'com.zoho.apptics:apptics-feedback'
implementation 'com.zoho.apptics:apptics-crash-tracker'
implementation 'com.zoho.apptics:apptics-ratings'
implementation 'com.zoho.apptics:apptics-appupdates'
implementation 'com.zoho.apptics:apptics-rc'
implementation 'com.zoho.apptics:apptics-crosspromo'
}
Note: Individual modules dependencies can also be directly used without Apptics BoM
List of Apptics libraries
Module | Gradle Dependency | Latest Version | Purpose |
---|---|---|---|
Analytics | com.zoho.apptics:apptics-analytics | 0.2.11.0 | Used for collecting Events, Sessions, Screens, and APIs |
Crash tracker | com.zoho.apptics:apptics-crash-tracker | 0.2.11.0 | Used for collecting the crash reports from the App |
In-App Feedback | com.zoho.apptics:apptics-feedback | 0.2.11.0 | Used for collecting feedback from the App |
In-App Updates | com.zoho.apptics:apptics-appupdates | 0.2.11.0 | Used to show the update pop-up in the App |
In-App Ratings | com.zoho.apptics:apptics-ratings | 0.2.11.0 | Used to show the rating pop-up in the App |
Remote Config | com.zoho.apptics:apptics-rc | 0.2.11.0 | Used to make minor UI/UX changes in the App |
Cross Promotion | com.zoho.apptics:apptics-crosspromo | 0.2.11.0 | Used to promote the family of Apps |
Logger | com.zoho.apptics:apptics-logger | 0.2.11.0 | Used to get logs from the App |