Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/avsystem/anjay-java
Anjay LwM2M client library port for Java applications
https://github.com/avsystem/anjay-java
android iot iot-application java lwm2m lwm2m-client
Last synced: about 11 hours ago
JSON representation
Anjay LwM2M client library port for Java applications
- Host: GitHub
- URL: https://github.com/avsystem/anjay-java
- Owner: AVSystem
- License: apache-2.0
- Created: 2020-10-21T13:14:46.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-29T15:32:03.000Z (almost 3 years ago)
- Last Synced: 2024-03-26T16:16:31.692Z (8 months ago)
- Topics: android, iot, iot-application, java, lwm2m, lwm2m-client
- Language: C++
- Homepage:
- Size: 285 KB
- Stars: 6
- Watchers: 9
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Anjay-java [](http://www.avsystem.com/)
[![Maven Central](https://img.shields.io/maven-central/v/com.avsystem.anjay/anjay-android?label=maven%20central%3A%20anjay-android)](https://search.maven.org/artifact/com.avsystem.anjay/anjay-android)
[![Maven Central](https://img.shields.io/maven-central/v/com.avsystem.anjay/anjay-java?label=maven%20central%3A%20anjay-java)](https://search.maven.org/artifact/com.avsystem.anjay/anjay-java)## About
This project provides almost 1:1 API bindings between [Anjay](https://github.com/AVSystem/Anjay)
(written in C) and Java, thus making it possible to run Anjay clients on
[Android](https://www.android.com/) 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
```sh
./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
```sh
./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
```sh
ANDROID_SDK_ROOT= ./gradlew -Pandroid :library:build
```The `aar` files are in `library/build/outputs/aar` directory.
### Running tests
```sh
./gradlew :testing:check
```