Giter VIP home page Giter VIP logo

airbitz-core-java's Introduction

airbitz-core-java

This repository contains the java bindings to the airbitz-core library.

Setup Using Gradle/Maven. (Does not require cloning this repo)

Just add airbitz-core-android to your dependencies in your build.gradle.

dependencies {
    compile 'co.airbitz:airbitz-core-java:0.9.+'
    compile 'co.airbitz:airbitz-core-android:0.9.+@aar'
    ...
}

Then add the Airbitz maven repo to your list of repositories

allprojects {
    repositories {
        ...

        maven {
            url "https://developer.airbitz.co/maven"
        }
    }
}

Use with React Native

Install the iOS/ObjC side of the bridge first. Follow instructions from airbitz-core-objc

Add Gson to your dependencies

dependencies {
    ...
    compile 'co.airbitz:airbitz-core-java:1.0.+'
    compile 'co.airbitz:airbitz-core-android:1.0.+@aar'
    compile 'com.google.code.gson:gson:2.6.2'
}

Add imports for React Native Bridge to your MainActivity.java

import com.facebook.react.ReactPackage;
import com.facebook.react.shell.MainReactPackage;

import co.airbitz.AirbitzCoreRCT.AirbitzCoreRCT;
import co.airbitz.AirbitzCoreRCT.AirbitzCoreRCTPackage;

import java.util.Arrays;
import java.util.List;

Add getPackages to the MainActivity class

public class MainActivity extends ReactActivity {
    ...
    protected List<ReactPackage> getPackages() {
        return Arrays.<ReactPackage>asList(
                new MainReactPackage(),
                new AirbitzCoreRCTPackage() // include it in getPackages
        );
    }
}

Copy the Java bridge files from this repo to your project

airbitz-core-java/ReactBridge/java/co/airbitz/AirbitzCoreRCT/*

to

/yourapp-repo-name/YourApp/android/app/src/main/java/co/airbitz/AirbitzCoreRCT/*

Sample javascript code for using AirbitzCore from ReactNative can be seen in the following repo

https://github.com/Airbitz/airbitz-react-test

See the file abc-react-test.js

Documentation

https://developer.airbitz.co/android

Building (Build the entire Java and C++ core library)

First have airbitz-core cloned locally at the same level as this repository.

./gradlew buildAirbitzMainnet assemble

If all goes well, you can publish to your local maven.

./gradlew publishToMavenLocal

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.