Rudder-Integration-Amplitude-Android

RudderStack's Native SDK Integration support for Amplitude.

License

License

GroupId

GroupId

com.rudderstack.android.integration
ArtifactId

ArtifactId

amplitude
Last Version

Last Version

1.0.1
Release Date

Release Date

Type

Type

aar
Description

Description

Rudder-Integration-Amplitude-Android
RudderStack's Native SDK Integration support for Amplitude.
Project URL

Project URL

https://github.com/rudderlabs/rudder-integration-amplitude-android
Source Code Management

Source Code Management

https://github.com/rudderlabs/rudder-integration-amplitude-android/tree/master

Download amplitude

How to add to project

<!-- https://jarcasting.com/artifacts/com.rudderstack.android.integration/amplitude/ -->
<dependency>
    <groupId>com.rudderstack.android.integration</groupId>
    <artifactId>amplitude</artifactId>
    <version>1.0.1</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.rudderstack.android.integration/amplitude/
implementation 'com.rudderstack.android.integration:amplitude:1.0.1'
// https://jarcasting.com/artifacts/com.rudderstack.android.integration/amplitude/
implementation ("com.rudderstack.android.integration:amplitude:1.0.1")
'com.rudderstack.android.integration:amplitude:aar:1.0.1'
<dependency org="com.rudderstack.android.integration" name="amplitude" rev="1.0.1">
  <artifact name="amplitude" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.rudderstack.android.integration', module='amplitude', version='1.0.1')
)
libraryDependencies += "com.rudderstack.android.integration" % "amplitude" % "1.0.1"
[com.rudderstack.android.integration/amplitude "1.0.1"]

Dependencies

compile (5)

Group / Artifact Type Version
androidx.annotation » annotation jar 1.1.0
com.amplitude : android-sdk jar 2.25.2
com.squareup.okhttp3 : okhttp jar 4.2.2
com.google.code.gson : gson jar 2.8.6
org.apache.commons : commons-lang3 jar 3.5

Project Modules

There are no modules declared in this project.

What is RudderStack?

RudderStack is a customer data pipeline tool for collecting, routing and processing data from your websites, apps, cloud tools, and data warehouse.

More information on RudderStack can be found here.

Integrating Amplitude with RudderStack's Android SDK

  1. Add Amplitude as a destination in the RudderStack dashboard and define apiKey and all other applicable settings .

  2. Add the dependency under dependencies

implementation 'com.rudderstack.android.sdk:core:1.+'
implementation 'com.rudderstack.android.integration:amplitude:1.0.1'
implementation 'com.google.code.gson:gson:2.8.6'

// Amplitude
implementation 'com.amplitude:android-sdk:2.25.2'
implementation 'com.squareup.okhttp3:okhttp:4.2.2'

// For using Google Advertising Id as device id
implementation 'com.google.android.gms:play-services-ads:18.3.0'

  1. Add these lines to your app/build.gradle under compileOptions in the android tag:
compileOptions {
  sourceCompatibility JavaVersion.VERSION_1_8
  targetCompatibility JavaVersion.VERSION_1_8
}

Initialize RudderClient

val rudderClient = RudderClient.getInstance(
    this,
    WRITE_KEY,
    RudderConfig.Builder()
        .withDataPlaneUrl(DATA_PLANE_URL)
        .withFactory(AmplitudeIntegrationFactory.FACTORY)
        .build()
)

and if you would like to send Google Advertising Id of the device as device id to the Amplitude then add the below code in the AndroidManifest.xml of your app under <application> tag:

<meta-data
    android:name="com.google.android.gms.ads.AD_MANAGER_APP"
    android:value="true" />

Send Events

Follow the steps from RudderStack Android SDK.

Contact Us

If you come across any issues while configuring or using this integration, feel free to start a conversation on our Slack channel. We will be happy to help you.

com.rudderstack.android.integration

RudderStack

Steer your Customer Data

Versions

Version
1.0.1