Pointzi (AndroidX) Setup¶
You can find an example of integration here
Prerequisites¶
- Your App must be targeted for at least Lollipop (21) and above;
- Your app’s compileSdkVersion must be set to 28 or higher
- Pointzi v2 uses AndroidX, so your app must use AndroidX as well (Migration instructions).
This version of Pointzi is recommended for all apps using AndroidX that don't specifically need Android v19-v21, if you need to support versions 19-21 please go to Pointz Legacy.
- Pointzi uses Java 1.8 features, please make sure your app uses it as well:
1 2 3 4 5 6 7 8 9
android { compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } kotlinOptions { jvmTarget = "1.8" } }
- Pointzi UI is based on Google's Material Components library. Please ensure your app's theme inherits from
Theme.MaterialComponents
or its subthemes.
You need to make sure that inside your app/res/values/styles.xml
(or equivalent) the parent of AppTheme
is part of the Theme.MaterialComponents
theme. Here is an example from the Wikipedia's app:
1 2 3 4 5 6 |
|
(If you are having issues with this please check instructions here, specially step 4)
Step 1 - Adding Pointzi to your gradle files¶
These are the two gradle files we need you to make changes
Step 2 - Project level build.gradle¶
Please add the Pointzi repository to your build.gradle
1 2 3 4 5 6 7 |
|
Step 3 - Module (app) level build.gradle¶
This will link the Pointzi SDK with your app.
You need to add this either to the root of your app's build.gradle or under the android {} task
1 2 3 |
|
Integrating Pointzi to your app¶
Set your Pointzi AppKey in your AndroidManifest.xml
file
Under the application tag, add the following meta-data tag replacing APP_KEY with your app key:
1 2 3 4 5 6 7 |
|
Identifying your users¶
At this point Pointzi is fully integrated on you app, but to make it easier to identify your users and use the full capabilities of the Pointzi SDK you can use the following method at any part of your code after performing the integration.
Java:¶
1 |
|
Kotlin:¶
1 |
|