Search code examples
android-studiogradleibm-cloudcloudant

Bluemix cloudant gradle packages for Android studio?


Alright, So. I'm looking to do a query to request some json packets from my bluemix cloudant to my app in Android studio. I tried following these instructions: https://www.ibm.com/support/knowledgecenter/es/SSHS8R_7.0.0/com.ibm.worklight.dev.doc/cloud/data/t_data_cloudantlocalsetup.html But the provided package links don't seem to be in Maven when i type it into gradle. If the packages no longer exist or aren't supported, How would i approach doing the same requests with http?


Solution

  • There are two Cloudant libraries available in Maven central that can be used in Android.

    1. java-cloudant; compile group: 'com.cloudant', name: 'cloudant-client', version: '2.16.0'
    2. sync-android; compile group: 'com.cloudant', name: 'cloudant-sync-datastore-android', version:'latest.release'

    The first is a Java library which can be used for making HTTP requests against a remote Cloudant or Apache CouchDB. The second is a sync library which can use Apache CouchDB's replication protocol to create a local copy of a database on device for use with, for example, offline use cases that sync back to the remote database.