Install SDK
1. Introduction
This guide provides a comprehensive walkthrough for integrating the MyChips SDK into your Android application, enabling the display of an engaging offerwall.
2. Prerequisites
Android Studio
Minimum version requirement 27.
3. SDK Integration
3.1 Adding the SDK
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
maven {
url = uri("https://europe-west1-maven.pkg.dev/mychips-b31fe/mychips-android-sdk")
}
}
}dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven("https://europe-west1-maven.pkg.dev/mychips-b31fe/mychips-android-sdk")
}
}For Kotlin DSL Projects: In your project-level
setting.gradle.kts
For Groovy-Based Projects: In your project-level
build.gradle
3.2 Adding the SDK Dependency to App-Level Build File
In your app-level build.gradle(Module :app) file, add the following dependency
3.3 Configuring the Android Manifest
In your AndroidManifest.xml, add the following:
Permission for Internet Access:
Activity Declaration:
4. Initializing the SDK
In your main activity’s onCreate method, import and initialize the SDK:
Obtain your API key and User ID from Universal Developer Portal
4.1 (Mandatory) Set Google AdvertisingId
Improve reward tracking and eCPM performance by passing the advertising id. Official documentation
4.2(Optional) Set userId if you have your own unique id
Replace "HERE YOUR USER ID" with your actual user ID variable or value.
If you do not provide a specific user ID, one will be automatically generated.
4.3(Optional) Set User Age
You can set the user’s age to help improve ad targeting and analytics.
Replace 30 with your actual user age variable or value (integer).
💡 Note:
The value should be an integer (e.g., 18, 25, 30).
Expected range is 0–100 (inclusive).
4.4(Optional) Set User Gender
You can set the user’s gender to help improve ad targeting and analytics.
Available enum values:
4.5 (Optional) Set Custom Parameters (aff_sub1–aff_sub5 )
aff_sub1–aff_sub5 )We provide 5 aff_sub parameters (aff_sub1, aff_sub2, aff_sub3, aff_sub4, aff_sub5), which you can use to pass custom values.
Replace "HERE YOUR CUSTOM VALUE" with your actual custom value.
5. Display the Offerwall
5.1 How to Display the Offerwall
Replace ‘AD_UNIT_ID’ with your actual Ad unit ID.
In your main activity’s onCreate method, import and initialize the SDK:
Your Ad unit ID can be found at link
5.2 (Optional) How to Set the Title on the Offerwall Toolbar
Replace ‘your_custom_title’ with your actual title.
If no title is set, the toolbar remains blank.
Last updated