OneSignal Help & Documentation

Welcome to the OneSignal New IA developer hub. You'll find comprehensive guides and documentation to help you start working with OneSignal New IA as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Discussions

Android SDK Setup

OneSignal Android Mobile App SDK Setup Guide. Also for Amazon apps using Android Studio.



1. Adding OneSignal Dependencies

1.1 Open your app/build.gradle (Module: app) file, add the following to the very top.

buildscript {
    repositories {
        maven { url ''}
    dependencies {
        classpath '[0.12.4, 0.99.99]'
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

repositories {
    maven { url '' }

1.2 Add the following to your dependencies section.

dependencies {
    implementation 'com.onesignal:OneSignal:[3.13.0, 3.99.99]'

1.3 Add the following in your android > defaultConfig section.

  • Update PUT_YOUR_ONESIGNAL_APP_ID_HERE` with your OneSignal App id
android {
   defaultConfig {
      manifestPlaceholders = [
          onesignal_app_id: 'PUT_YOUR_ONESIGNAL_APP_ID_HERE',
          // Project number pulled from dashboard, local value is ignored.
          onesignal_google_project_number: 'REMOTE'

Sync Gradle

Make sure to press "Sync Now" on the banner that pops up after saving!

2. Add Required Code

2.1 Add the following to the onCreate method in your Application class.

import com.onesignal.OneSignal;

public class YourAppClass extends Application {
   public void onCreate() {
      // OneSignal Initialization
import com.onesignal.OneSignal

class YourAppClass : Application() {
   override fun onCreate() {
      // OneSignal Initialization

3. Create a Default Notification Icon

3.1 By default, notifications will be shown with a bell icon in the notification shade. Follow the Customize Notification Icons guide to create your own small notification icon for your app.


If run into any issues please see our Android troubleshooting guide

Notification Features

To configure notifications features, go to Features Setup.

Notification Handlers

NotificationOpenedHandler - This will be called when a notification is tapped on.

NotificationReceivedHandler - This will be called when a notification is received.

NotificationExtenderService - Optional

Set up the NotificationExtenderService if you want to do one of the following:

  • Receive data in the background with or without displaying a notification.
  • Override specific notification settings depending on client side app logic such as custom accent color, vibration pattern, or other any other NotificationCompat options available.

AndroidX Migration

If your project is using AndroidX you will need to make sure Jetifier is enabled to be compatible with OneSignal.
In your file, set the following two flags to true


You're Done!

Next up: Send your first push notification via the OneSignal Dashboard


How to set App Permissions?

Android automatically sets App Permissions for push when the user downloads and opens the app, they get subscribed without any prompts.

We don't require any additional app permissions be set, unless you are using location tracking which you will need to add those permissions.

We recommend disclosing to users in a privacy policy that data is shared with a 3rd party for the purposes of sending personalized or targeted notifications. But this would be true no matter what service you use. There are several privacy policy generators you can find by searching Google if you don't yet have one.

Updated 10 days ago

Android SDK Setup

OneSignal Android Mobile App SDK Setup Guide. Also for Amazon apps using Android Studio.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.