Install
Get your API key from your project settings at dash.1sygnal.app .
Gradle (Kotlin DSL)
dependencies {
implementation("app.onesygnal:onesygnal-sdk:1.0.0")
}Gradle (Groovy DSL)
dependencies {
implementation "app.onesygnal:onesygnal-sdk:1.0.0"
}Maven
<dependency>
<groupId>app.onesygnal</groupId>
<artifactId>onesygnal-sdk</artifactId>
<version>1.0.0</version>
</dependency>API key
Add your key to AndroidManifest.xml as a <meta-data> entry — the SDK reads it at
initialize() time:
<application>
<meta-data
android:name="app.onesygnal.API_KEY"
android:value="YOUR_API_KEY" />
</application>Or set it in code before calling initialize() — see Configuration
for the setApiKey() override and what happens if neither is set.
No other setup is required — the SDK talks to a fixed, compiled-in API host
(https://sdk-api.1sygnal.app); there’s no equivalent of Web’s apiUrl option.