For the complete documentation index, see llms.txt.

Disabling Automatic SDK Initialization

Last updated View as Markdown

This SDK mainly receives critical fixes. New capabilities are shipping in the CSQ SDK first.

Migrate to the CSQ SDK using our AI wizard.

By default the SDK initializes automatically at startup; you can disable this behavior and call start() manually.

Set the com.contentsquare.android.autostart flag to false in your AndroidManifest.xml file.

AndroidManifest.xml
<application>
...
<meta-data
android:name="com.contentsquare.android.autostart"
android:value="false"
/>
...
</application>

Then, you can start the Contentsquare SDK by calling the start() method of the Contentsquare class.

Contentsquare.start(context)

This initialize function is called automatically on app startup if the com.contentsquare.android.autostart flag is not listed in the AndroidManifest.

This function should be called before the first activity is created. Call this function in the onCreate() method of a custom Application subclass:

import android.app.Application
import com.contentsquare.android.Contentsquare
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
// Start Contentsquare SDK
Contentsquare.start(this)
}
}