Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If there is a way to use this driver for Android? #37

Open
fangvv opened this issue Nov 22, 2017 · 6 comments
Open

If there is a way to use this driver for Android? #37

fangvv opened this issue Nov 22, 2017 · 6 comments
Assignees

Comments

@fangvv
Copy link

fangvv commented Nov 22, 2017

I don't know if it is OK to use it for Android. If not, how could I do to let an Android APP to use BigchainDB as its DB. Thanks.

@alvin-reyes
Copy link
Collaborator

Not at the moment. We're trying to make it fully compatible with Android

@adonnini
Copy link

adonnini commented Dec 4, 2017

Hi,
I have an Android app which i want to integrate with datum. I need to have a BigchainDB Java driver (although I guess I could try and make things work with the JS driver).
Could you give me an idea of when the Bigchain Java driver will be compatible with Android?
Thanks,
Alex Donnini

@bohdanbezp
Copy link
Contributor

Hey,
I'm an Android developer myself and we are using the driver as a part of Android app. Basically you need to provide your version of JSONObject which is self-sorted by key. Tell me if you need more details.

@adonnini
Copy link

adonnini commented Dec 9, 2017 via email

@adonnini
Copy link

adonnini commented Dec 18, 2017 via email

@bohdanbezp
Copy link
Contributor

@adonnini
Sorry for the late reply. In order for the code to work on Android you need:

  1. Download official org.json implementation source code
  2. in the JSONObject constructor replace map field initialization with
    this.map = new TreeMap<String, Object>();
  3. Rename the package name of the modified org.json distribution for example to org.jsonorder.
  4. Add the package to driver's build and replace all occurences of org.json.JSONObject in the driver to org.jsonorder.JSONObject
  5. Build the driver

This is a dirty way but right now there's no other way around without too much effort,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants