Applixir Ads Android SDK
Getting Started with AppLixir Ads SDK
AppLixirAds wrapper that allows you to open up a WebView that runs AppLixir ad after providing it with your API key.
Prerequisites
- Android Studio (or any other Android development IDE)
- Android SDK version 24 or higher
- Applixir api key
Installation
The Applixir Ads SDK will be available on Maven Central, making it easy to integrate into your project. Add the following dependency to your build.gradle file:
gradle
dependencies {
implementation("com.init.applixiradssdk:applixiradssdk:1.1.0")
}
Example Usage
To use the Applixir Ads SDK, follow these steps: Initialize the SDK: Call the initialization method in your MainActivity or Application class.
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
TestApplixirAdsSDKLibraryTheme {
Scaffold(
modifier = Modifier
.fillMaxSize()
.systemBarsPadding() // replaces enableEdgeToEdge()
) { innerPadding ->
Box(
modifier = Modifier
.fillMaxSize()
.padding(innerPadding),
contentAlignment = Alignment.Center
) {
Button(onClick = {
val player = AppLixirAdPlayer(this@MainActivity)
player.setApiKey("APPLIXIR_API_KEY")
player.playAd(this@MainActivity) {
println("Ad completed")
}
}) {
Text("Open Ad", fontSize = 18.sp)
}
}
}
}
}
}
}
License
This project is licensed under the Apache License. See the LICENSE file for details.
Was this article helpful?
Your feedback shapes what we write next.
Still need help?
Our team responds to publishers within 1 business day.
Contact support →