Git Product home page Git Product logo

anjay-java's Introduction

Maven Central Maven Central

Anjay-java

About

This project provides almost 1:1 API bindings between Anjay (written in C) and Java, thus making it possible to run Anjay clients on Android for example.

This is a preview release and we don't provide any guarantees about API stability or library reliability.

Using in Android Studio

This project is released to Maven Central repository as com.avsystem.anjay.anjay-android. Add mavenCentral() in repositories section of your build script and implementation 'com.avsystem.anjay:anjay-android:2.+' in dependencies to use it.

Using anjay-java package

Although the anjay-java package is released on Maven Central repository, it requires native shared library to be available. See the Compilation guide for details how to build the native library.

Compilation guide

First of all, remember to update all submodules using git submodule update --init --recursive.

Build library

./gradlew :library:build

The jar file is placed in library/build/libs directory. Note that it doesn't include the native library, which can be found in library/build/cmake directory.

Build and run demo

./gradlew :demo:build
java -Djava.library.path=library/build/cmake/ -jar demo/build/libs/demo.jar

By default, the client attempts to connect to coap://127.0.0.1:5683, but it can be customized using command line arguments. Use --help to see all available options.

Building for Android

ANDROID_SDK_ROOT=<path to Android SDK> ./gradlew -Pandroid :library:build

The aar files are in library/build/outputs/aar directory.

Running tests

./gradlew :testing:check

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.