Elarian

Elarian is a customer engagement runtime that let's you code against customer data allowing you to track, schedule, execute and analyze engagement actions from a customer POV.

License

License

MIT
GroupId

GroupId

com.elarian
ArtifactId

ArtifactId

elarian-android
Last Version

Last Version

0.2.2
Release Date

Release Date

Type

Type

aar
Description

Description

Elarian
Elarian is a customer engagement runtime that let's you code against customer data allowing you to track, schedule, execute and analyze engagement actions from a customer POV.
Project URL

Project URL

https://developers.elarian.com
Source Code Management

Source Code Management

https://github.com/ElarianLtd/java-sdk

Download elarian-android

How to add to project

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

Dependencies

compile (1)

Group / Artifact Type Version
com.google.protobuf : protobuf-javalite jar 3.15.5

Project Modules

There are no modules declared in this project.

Elarian

The SDK provides convenient access to the Elarian APIs from applications written in Kotlin, Java, and Scala.

Project Status: Still under ACTIVE DEVELOPMENT, APIs are unstable and may change at any time until release of v1.0.0.

Documentation

Take a look at the API docs here. For detailed info on this SDK, see the reference.

Install

You can depend on the .jar through Maven:

<dependency>
  <groupId>com.elarian</groupId>
  <artifactId>elarian-core</artifactId>
  <version>0.2.2</version>
</dependency>

or sbt:

libraryDependencies += "com.elarian" % "elarian-core" % "0.2.2"

or Gradle:

dependencies{
  implementation 'com.elarian:elarian-core:0.2.2'
  // Or if you're building for android
  // implementation 'com.elarian:elarian-android:0.2.2'
}

Usage

The SDK needs to be initialized with your API key, which you get from the dashboard.

import com.elarian.*;
import com.elarian.model.*;

// ...

String appId = "test_app";
String orgId = "test_org";
String apiKey = "test_api_key";

Elarian app = new Elarian(apiKey, orgId, appId);

app.connect(new ConnectionListener() {
    @Override
    public void onPending() {
        log.info("Pending...");
    }

    @Override
    public void onConnecting() {
        log.info("Connecting...");
    }

    @Override
    public void onClosed() {
        log.info("Connection Closed");
    }

    @Override
    public void onError(Throwable throwable) {
        log.error("Failed to connect: " + throwable.getMessage());
    }

    @Override
    public void onConnected() {
        log.info("Connected!");
        Tag tag = new Tag("some-key", "some-value");
        MessagingChannel channel = new MessagingChannel("2020", MessagingChannel.Channel.SMS);
        Message message = new Message(new MessageBody("This is a test"));
        app.sendMessageByTag(tag, channel, message)
                .subscribe(
                        res -> log.info(res.description),
                        err -> err.printStackTrace()
                );
    }
});
try {
    Thread.currentThread().join();
} catch (InterruptedException e) {
    e.printStackTrace();
}

See examples for more usage examples.

Development

See SDK Spec for reference.

Issues

If you find a bug, please file an issue on our issue tracker on GitHub.

Known Issues

  • Elarian domain name not resolving on Android
com.elarian

Elarian

A customer engagement platform

Versions

Version
0.2.2