Thanks to the hard work of Mohammad Abdul Sami Sovrin enthusiasts now have support building libindy for Android in the master branch of our repo.
You can now build the libindy libraries for Android by just running a script. Yeah!
If you want to spare that building process you can download the libraries from Evernym. Thanks!
Now what? You have a libindy.so for arm, arm64 and x86, but how do you use it?
I have created an Android Studio sample application DroidLibIndy that you might use as a starting point (if you don't like reading blog posts).
Still reading? Here is a list of quirks you need in your flashy new Indy-App.
- First you have to put the libindy library into the correct jni folder e.g.:
app/src/main/jniLibs/arm64-v8a
This other way to do this did not work for me. - Source code and Target compatibility have to be Java 1.8
Otherwise CompletableFuture and other stuff do not compile - You need a network security policy because libindy secures its communication using zeromq and Android only accepts HTTPS as a secure protocol.
- You might need a lint.xml to get JNA linked.
- Copy libindy's Java wrapper code to your project using the path org/hyperledger/indy/sdk.
cp -r ~pathto/indy-sdk/wrappers/java/src/main/java/org/ pathtoyourapp/app/src/main/java/
I did not try the maven route here. - In your app's onCreate method set the environment variable 'EXTERNAL_STORAGE'
- Of course you need to have all the dependencies configured in your build system.
Have fun exploring Hyperledger Indy on Android!
No comments:
Post a Comment