Fork me on GitHub

Getting started - Android

Step 1

Add the following dependencies to your Android project.

Via Gradle:

compile 'io.divide:client-android:0.5.3'
compile 'io.divide:client-android-mock:0.5.3'

Via Maven:

<dependency>
   <groupid>io.divide</groupid>
   <artifactid>client-android</artifactid>
   <version>0.5.3</version>
</dependency>
<dependency>
   <groupid>io.divide</groupid>
   <artifactid>client-mock</artifactid>
   <version>0.5.3</version>
</dependency>

Step 2

Create a new Java class that extends Application and initialize Divide.io using your server's URL in the onCreate method like so:

public class YourApplication extends Application {

    @Override
    public void onCreate() {
        // Context, production server, debug server
        Backend.init(new AndroidDebugConfig(this, "https://your-project-id.appspot.com/api/", ""));
    }
}

Step 3

That's it!

You can now begin using our APIs to send and retrieve data from your backend.

Links