Add an application class

Add an Application class to initialize the RudderStack SDK.

RudderStack recommends using a global Application class to initialize our SDK. If you don’t have an Application class for your project, follow these steps:

  1. Create a class that extends Application.
  1. Open AndroidManifest.xml file of your app and locate <application> tag.
  2. Add an attribute android:name and set it to your new application class.
<application
    android:name=".MainApplication"
    <!-- ... -->
</application>

Questions? Contact us by email or on Slack