sync-android | A JSON-based document datastore for Android applications
kandi X-RAY | sync-android Summary
kandi X-RAY | sync-android Summary
Once the libraries are added to a project, the basics of adding and reading a document are:. Extensive code samples can be found in the CRUD samples class. You can also subscribe for notifications of changes in the database, which is described in the events documentation. The javadoc for the latest release version of the library is the definitive reference for the library. Each jar contains the full javadoc for itself and the other jars - this is for convenience at the slight expense of duplication. All private API classes are in the com.cloudant.sync.internal package. API users should not use these classes as fields, method signatures, and implementation details may be subject to change. Directly using the classes in these packages or calling their methods is not supported. Everything else under com.cloudant.sync is public API and subject to the usual versioning and deprecation practices. API users can expect this to be a stable API. This behaviour follows the Semantic Versioning 2.0.0 specification. Classes in the com.cloudant.sync.internal package are not visible in javadoc.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Examples of how to use the API
- Get an existing document store
- Deletes the DocumentStore instance
- Shuts down this database connection
- Calls the insert
- Insert a new branch
- Adds an attachment to the database
- Executes the callable
- Retrieves a collection of revisions that are not present in the database
- Retrieves changes from the database
- Builds a select query from a table
- Ends a transaction
- Gets the stream to write to disk
- Creates and returns a custom interceptor interceptor
- Execute the given SQLite update
- Retrieves the maximum sequence number from the database
- Replies the batch
- Run the migration
- Retrieves the index metadata
- Insert index data
- Updates the specified document
- Attempts to resolve all conflicts of a document
- Called when the receiver is connected
- Retrieves full revision information from the database
- Migrates all existing blobs
- Updates the schema for the given database
sync-android Key Features
sync-android Examples and Code Snippets
Community Discussions
Trending Discussions on sync-android
QUESTION
I'm using Cloudant-sync android latest release so far: 2.0.2 and targeting Android api 21+.
My server database is CouchDB 2.1.0
I'm trying to trigger a replication pull from my android app, to update the local db. I'm giving the source URI to the ReplicatorBuilder like: "https: //user:password@databaseurl/db_name" (as specificated here https://github.com/cloudant/sync-android/blob/master/doc/replication.md) but in the generated replicator object, if I inspect "replicator.strategy.sourceDb" the db uri is just "https: //databaseurl/db_name" and so, i get unhautorized (it works fine if I deactivate the security check on the database server)
This is my running code:
...ANSWER
Answered 2017-Sep-10 at 02:00Well, the problem seems to be with the CookieAuthentication (which is the default authentication method of the Replicator when creds are passed with in the URI) I don't really know why is it failing, because the CouchDB server instance is configured to accept CookieAuthentication.
Anyway, this may not be the best possible solution, but is a good enough workaround. I have made this work by forcing the BasicAuthentication method as follows:
QUESTION
I am currently working on an android project where I would like to store lots of data collected by sensors locally to be able to later push them to my cloudant database for when I do not have access to internet while collecting data.
I am using the git repo https://github.com/cloudant/sync-android
However if the application closes, the data seems to be cleared.
...ANSWER
Answered 2017-Jul-18 at 02:04It looks like you are missing a call to save the revision to the DocumentStore. That would look something like this:
QUESTION
my database has a lot of documents, and each document has a field called doc_type, so i can filter it, but android is giving a error while trying to filter:
...ANSWER
Answered 2017-Mar-23 at 20:37i found -> groups.google.com/forum/#!topic/mobile-couchbase/tw5462qMFeM
i removed the _replicator document from cloudant database(online) and it started to work
QUESTION
as docs say( https://github.com/cloudant/sync-android/blob/master/doc/query.md) im trying to do a query inside a list
look:
...ANSWER
Answered 2017-Mar-09 at 15:54I think this is unsupported, see the doc on unsupported features, specifically the highlighted entry:
Arrays
- Dotted notation to index or query sub-documents in arrays.
- Querying for exact array match, { field: [ 1, 3, 7 ] }.
- Querying to match a specific array element using dotted notation, { field.0: 1 }.
- Querying using $all.
- Querying using $elemMatch.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install sync-android
You can use sync-android like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the sync-android component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page