Coder Social home page Coder Social logo

vcx-demo-android's Introduction

LibVCX Demo Android Project for Alice

This Android demo project code is based on vcx-skeleton-android, and implements demo code for Alice on Android simulator. You can use any Faber demo in different wrappers (python or node) for testing. Internally, the application serializes and deserializes the vcx connection object between operations. It saves the configuration details in the shared preference, and uses this when it is available for initialization of VCX.

Note: If you checkout the develop branch, there is a more sophisticated demo project that utilizes non-secret wallet APIs to save/retrieve VCX objects. Moreover, it downloads messages from the cloud agent, and processes them according to it's context.

Prerequisites

Android Studio

It requires the Android Studio 3.6 or newer

Create Native Libraries

Run the script. This will download all native libraries needed for this project, and create the jniLib folder with required ABIs

$ ./populate_libraries.sh

Note: You can change the version number of vcx in the script populate_libraries.sh

Native Libraries included

All libraries will be available after running populate_libraries.sh script, but if you want to get those libraries by yourself, please refer to the below.

  • vcx v0.14.2: It contains libindy v1.15.0, so you don't need to download prebuilt libindy library.
  • libjnidispatch v4.5.2: You can extract libjnidispatch.so from jar file using, for example unzip android-x86.jar libjnidispatch.so command. Alternatively, you may get a file in the local gradle folder (You can get a location of file in the Android Studio > Project tab > expand External Libraries > expand net.java.dev.jna:jna:4.5.2@aar > right click on classes.jar > Reveal in Finder > they are under jni folder)
  • libc++_shared r21: If your platform is macOS, and downloaded the latest NDK, you can get libc++_shared.so file for each ABI in the ~/Library/Android/sdk/ndk/21.1.6352462/sources/cxx-stl/llvm-libc++/libs folder

Steps to run Demo

Cloud Agent

You would like to start NodeVCXAgency in the remote host with a specific IP address rather than localhost, or you need to modify the serviceEndPoint of invitation from Faber to 10.0.2.2 which is the localhost of the Android simulator.

Update the agncy_url field in the app/src/main/res/raw/provision_config.json file with your cloud agent's url

Indy Pool

You would also like to start the Indy Pool on a specific IP address with the same reason in the cloud agent. Alternatively, you may use some public Indy Pools available on the web.

Update app/src/main/res/raw/genesis_txn.txt file with the genesis transaction info of the indy pool you want to access.

Run the Alice Demo

  1. Run the Faber with a different demo application
  2. Click the PROVISION button to provision an agent, and initialize VCX.
  3. Copy the invitation from the Faber, and paste it in the Invitation field of the Alice Demo Application
  4. Click the CONNECTION REQUEST button
  5. After connection established, issue credential from Faber demo
  6. Click the ACCEPT OFFER button in the Alice Demo Application, you will get a credential in a moment
  7. In the Faber Demo, ask for proof request
  8. Click the PRESENT PROOF button. Faber will verify the proof and send the ack after that.
  9. Alice Demo Application will get an ack, and you are done.

vcx-demo-android's People

Contributors

airoasis avatar

Watchers

 avatar

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.