Integration
1. Add the SDK dependency
Add the following dependency to your project’s build.gradle file:
implementation 'com.bidease:bidease-mobile:1.3.9'⚠️ Make sure to always use the latest available SDK versions from Bidease.
Test Mode
If you want to enable Test Mode, add this dependency as well:
implementation 'com.bidease:bidease-mobile-test-mode:1.3.9'⚠️ Important: Test mode must be disabled before submitting the app to the store.
- Additionally, Bidease can enable Test Mode per bundle on the server side - this option is recommended for first integrations. 👉 Contact your Bidease manager to activate or deactivate it during QA.
- Ensure IDFA/GAID tracking is enabled during QA so the Bidease team can review logs and assist with troubleshooting if needed.
Remove optional or ad network–specific permissions (optional)
To exclude certain permissions (for example, those added by other ad networks), modify your AndroidManifest.xmlas shown below:
<uses-permission android:name="android.permission.READ_PHONE_STATE" tools:node="remove"/>2. Initialization
Add the following Bidease SDK initialization code inside the onCreate() method of your main Activity:
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
CoroutineScope(Dispatchers.Main).launch {
when (val initResult = BideaseMobile.init(applicationContext)) {
is InitSuccess -> {
BideaseMobile.sendEvent(eventName = "InitSuccess", params = hashMapOf("TEST_PARAM" to "test1"))
println("InitSuccess")
}
is InitFailure -> {
BideaseMobile.sendEvent(eventName = "InitFailure: ${initResult.error}")
println("InitFailure: ${initResult.error}")
}
}
}
}
override fun onDestroy() {
super.onDestroy()
BideaseMobile.onDestroy()
}
}Next steps
- Implement different Ad Types.
Updated 10 days ago