safe_app_java is a Java wrapper for the safe_app API.
safe_app is a native library which exposes low level API for application development on SAFE Network. It exposes APIs for authorisation and to manage data on the network.
Maintainer: Krishna Kumar (krishna.kumar@maidsafe.net)
| Android | Coverage Status |
|---|---|
The API documentation for safe_app_java library is available at docs.maidsafe.net/safe_app_java.
Android API 24 and above (armeabi-v7a, x86_64 support).
Two flavours of the android library are available: safe-app-android and safe-app-android-dev for the non-mock and mock network respectively.
The libraries are available on the jcenter() maven repository. To include the library in your android project add the following to the dependencies in the build.gradle file.
dependencies {
implementation 'net.maidsafe:safe-app-android-dev:0.1.0' // mock network
implementation 'net.maidsafe:safe-app-android:0.1.0' // non-mock network
}
We recommend using the product flavours feature to include dependencies for the mock and non-mock variants of your application as demonstrated in the safe-getting-started-android application.
safe_app_java requires
- Gradle 4+
- Java 8
- Android SDK
To build the AAR packages for Android, first make sure that the ANDROID_HOME environment variable is set and then run the following commands inside the root directory.
gradlew :safe-app-android:download-nativelibs
gradlew :safe-app-android:build
On a successful build the AAR libraries will be generated in the safe-app-android/build/outputs/aar folder.
To build the API documentation locally
gradlew :safe-app-android:javadoc
The generated documentation will be available in the safe-app-android/build/docs/javadoc directory.
The unit tests in safe-app are shared with safe-app-android. To run the Instrumentation tests:
gradlew :safe-app-android:runInstrumentationTests
This will require a supported emulator / Android device (with USB debugging enabled)
Get your developer related questions clarified on SAFE Dev Forum. If your looking to share any other ideas or thoughts on the SAFENetwork you can reach out on SAFE Network Forum
This SAFE Network library is dual-licensed under
- the Modified BSD (LICENSE-BSD) or
- the MIT license (LICENSE-MIT)
at your option.
Copyrights in the SAFE Network are retained by their contributors. No copyright assignment is required to contribute to this project.