Skip to main content
You’ll be sending events from your Android app in three steps.
1

Create an Android Source

In the Zeotap CDP, create a Source of category App Events with data source Android Native SDK. From the IMPLEMENTATION DETAILS tab, copy your write_key.Full walkthrough: Create an Android SDK Source.
2

Add the SDK

3

Initialize the SDK in MainApplication

Add the SDK initialization to MainApplication.onCreate:
import com.zeotap.collect.Collect;
import com.zeotap.collect.CollectOptions;

public class MainApplication extends Application {
  @Override
  public void onCreate() {
    super.onCreate();
    CollectOptions options = CollectOptions.builder(this)
      .credential("YOUR_WRITE_KEY")
      .enableLogging(true)
      .uploadBatchSize(5)
      .maxCacheSize(500)
      .useConsent(true)
      .checkForCMP(false)
      .build();

    Collect.init(options);
    // Or with a callback:
    // Collect.init(options, (res) -> { /* handle response */ });
  }
}
In AndroidManifest.xml, declare MainApplication:
<application
    android:name=".MainApplication"
    ...>
</application>
For apps on API 31+ that want the AdID, declare the permission:
<uses-permission android:name="com.google.android.gms.permission.AD_ID"/>
4

Send your first event

From anywhere in your app:
Collect collect = Collect.getInstance();
collect.setPageProperties(Collections.singletonMap("name", "Home"));

Map<String, Object> eventProps = new HashMap<>();
eventProps.put("productID", "1234");
collect.setEventProperties("view_product", eventProps);
To verify, log into the Zeotap CDP, open your Android Source, and watch the PREVIEW tab for incoming events.

Next steps

Configure CollectOptions

Consent flags, batching, hashing, country, and more.

Capture user identities

Stitch events to profiles using email, phone, login ID, or custom IDs.

Set up consent

Default opt-in, TCF 2.0, or custom consent.

See examples

Common patterns: AdID, login, logout, callbacks.
Last modified on June 22, 2026