Android push library manual initialization

The edna library is initialized automatically by default.

If you want to initialize the library manually (for example, if your application implements its own Configuration.Provider), add the library initialization code to the onCreate method of the application:

   override fun onCreate() {
        super.onCreate()

        AppInitializer.getInstance(applicationContext)
            .initializeComponent(PushXInitializer::class.java)
    …
    }

And also remove the library initializer com.edna.android.push_x.PushXInitializer from androidx.startup.InitializationProvider:

 <provider
            android:name="androidx.startup.InitializationProvider"
            android:authorities="${applicationId}.androidx-startup"
            tools:node="merge">
            <!-- other initializers -->
            <meta-data
                android:name="com.edna.android.push_x.PushXInitializer"
                android:value="androidx.startup"
                tools:node="remove" /> <!-- only if using manual initialization -->
        </provider>
In this article