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

Create Application Class - Android Studio

1. Open your main AndroidManifest.xml
2. Add android:name=".ApplicationClass" to your <application> tag

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.test_login_activity">
   <application
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:name=".ApplicationClass">
        ...
    </application>
</manifest>

3. Hover over android:name=".ApplicationClass" or press Alt + Enter or Option + Enter and select Create class 'ApplicationClass'.

This will automatically create the class for you. You can do so manually if you choose.

4. Now add the onCreate method to your new Application class.

import android.app.Application;

public class ApplicationClass extends Application {
   @Override
   public void onCreate() {
      super.onCreate();
      // TODO: Add OneSignal initialization here
   }
}
import android.app.Application

class ApplicationClass : Application() {
   override fun onCreate() {
      super.onCreate()
      // TODO: Add OneSignal initialization here
   }
}

Next Steps

Updated 3 months ago


Create Application Class - 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.