/ToDoLite-Android

attachment

Primary LanguageJava

ToDo Lite for Android

Join the chat at https://gitter.im/couchbase/mobile

A shared todo app that shows how to use the uses the Couchbase Lite Android framework to embed a nonrelational ("NoSQL") document-oriented database in an Android app and sync it with Couchbase Server in a public or private cloud.

The app is available for download in Google Play.

screenshot

Prequisites

Get the code

$ git clone https://github.com/couchbaselabs/ToDoLite-Android.git
$ cd ToDoLite-Android
$ git submodule init && git submodule update

Build and run the app

  • Import the project into your Android Studio by selecting build.gradle or settings.gradle from the root of the project.
  • Run the app using the "play" or "debug" button.

Run the Unit Tests

See Running Unit Tests for Couchbase Lite Android for instructions.

Point to your own Sync Gateway (Optional)

There are three build variants: debug, dev, release.

You can change the build variant in the Build Variants tab in Android Studio:

img

The debug and release variants point to a Sync Gateway instance hosted by Couchbase on a demo server.

If you want to use your own Sync Gateway instance, you can select the dev build variant and make sure to have sync_url_http and sync_url_https set in local.properties in the root directory of the project. For example, if you're running the app on the android emulator it would be:

sync_url_http=http://10.0.2.2:4984/todos/
sync_url_https=https://10.0.2.2:4984/todos/

If you're running the app on a Genymotion emulator, the IP address would be 10.0.3.2. Note the local.properties file is not committed to git. You can now use the dev build variant for developing with SyncGateway running locally and your emulator of choice.

You'll want to use the following Sync Gateway Config

Community

If you have any comments or suggestions, please join our mailing list and let us know.

License

Released under the Apache license, 2.0.

Copyright 2011-2014, Couchbase, Inc.