Getting Started

First, add jitpack to your root gradle file at the end of repositories:

allprojects {
    repositories {
    ...
        maven { url 'https://jitpack.io'}
    }
}

Adding Ethereum SDK as a Maven or Gradle Dependency

For “Maven” add this dependency to your module:

<dependency>
        <groupId>com.github.centerprime</groupId>
        <artifactId>Ethereum-Client-SDK</artifactId>
        <version>1.0.8</version>
</dependency>

For “Gradle” add this dependency to your module:

dependencies {
    implementation 'com.github.centerprime:Ethereum-Client-SDK:1.0.8'
}

Basic Usage

Once you have the dependencies set up you can start using CenterPrime by creating a Ethereum Wallet:

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.Toast;
import com.centerprime.ethereum_sdk.EthManager;
import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.schedulers.Schedulers;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        EthManager ethManager = EthManager.getInstance();

        String password = "{{wallet_password}}";

        ethManager.createWallet(password, this)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(wallet -> {
                    String walletAddress = wallet.getAddress();
                    String keystore = wallet.getKeystore();
                }, error -> {

                });
    }
}

Congratulations! Now you are a CenterPrime user.