Git Product home page Git Product logo

jonovono / rudder-sdk-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rudderlabs/rudder-sdk-android

0.0 2.0 0.0 1.09 MB

Repo for RudderStack's Android SDK. RudderStack is an open-source, warehouse-first customer data pipeline and Segment alternative. It collects and routes clickstream data and builds your customer data lake on your data warehouse.

Home Page: https://www.rudderstack.com

License: MIT License

Java 94.97% Kotlin 4.96% Shell 0.07%

rudder-sdk-android's Introduction

Download

What is Rudder?

Short answer: Rudder is an open-source Segment alternative written in Go, built for the enterprise. .

Long answer: Rudder is a platform for collecting, storing and routing customer event data to dozens of tools. Rudder is open-source, can run in your cloud environment (AWS, GCP, Azure or even your data-centre) and provides a powerful transformation framework to process your event data on the fly.

Released under Apache License 2.0

Getting Started with Android SDK

  1. Add these lines to your app/build.gradle
repositories {
  maven { url  "https://dl.bintray.com/rudderstack/rudderstack" }
}
  1. Add the dependency under dependencies
implementation 'com.rudderstack.android.sdk:core:1.0.10'

Initialize RudderClient

val rudderClient: RudderClient = RudderClient.getInstance(
    this,
    <WRITE_KEY>,
    RudderConfig.Builder()
        .withDataPlaneUrl(<DATA_PLANE_URL>)
        .build()
)

or (compatible with existing Segment code)

RudderClient.Builder builder = new RudderClient.Builder(this, <WRITE_KEY>);
RudderClient.setSingletonInstance(builder.build());

Send Events

rudderClient.track(
    RudderMessageBuilder()
        .setEventName("some_custom_event")
        .setProperty(
            TrackPropertyBuilder()
                .setCategory("test_category")
                .build()
        )
        .setUserId("test_user_id")
)

or (compatible with existing Segment instrumentation code)

String customEvent = "some_custom_event";
String propertyKey = "some_property_key";
String propertyValue = "some_property_value";
RudderClient.with(this).track(
        customEvent,
        new RudderProperty().putValue(propertyKey, propertyValue)
);

For more detailed documentation check the documentation page.

Register your callbacks

For device mode destinations- You can register callbacks, which will be executed after the nativeSDK has been successfully initialized.Use the onIntegrationReady method to register your callback.The following snippet shows an example:

rudderClient.onIntegrationReady("Lotame") {
  var nativeSDK  = (it as LotameIntegration)
  // your custom code
}

The variable it contains the intialized nativeSDK object. Note: The method onIntegrationReady accepts two arguments- the integration name(eg. "Lotame") and the callback.

Registering Lotame's onSync callback shows one more example of registering a callback using onIntegrationReady.

Contact Us

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

rudder-sdk-android's People

Contributors

ameypv-rudder avatar arnab-p avatar arnabp92 avatar desusai7 avatar dhawal-rudder avatar dhawal1248 avatar ruchiramoitra avatar soumyadebm avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.