Documentation: Push Notifications Onsite Messaging REST API
  1. Documentation
  2. Android App Push Notification
  3. Create Application Class

Create Application Class for Android App

Instructions to Create Application Class to your Android Apps using Android Studio.

  • Open main AndroidManifest.xml
  • Add android:name=".MyApplication" to your <application> tag
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:name=".MyApplication"
        ...
        ...>
    Copy
  • Mouse hove over .MyApplication. This will show a small popover and then click on Create Class 'MyApplication'.
    Android Create Application Class
    This will create class for you automatically, you can also create the class manually.
  • Now add the onCreate method to your newly created Application class. Later, we'll be going to add PushAlert Android SDK initialization code in this method.
    import android.app.Application;
    
    public class MyApplication extends Application {
        @Override
        public void onCreate() {
            super.onCreate();
    
            //Add PushAlert Android SDK Initialization Code
        }
    }
    Copy