TODOs: Userdata collection

This sets up the userdata syncgroup among the same user's devices.
When the user creates a new todo list, the other devices will also
join that todo list collection.

We currently shard by email address and use a common cloud.

Caveats:
- Since we can only create syncgroups underneath an existing syncbase,
  and merging is not supported, the same user must be sure to start
  one device a bit before the other to avoid a creation race.
- Discovery between syncbases has occasional errors saying that ads
  are too large on both the creator and joiner sides.
  This is expected, but we need a hack to syncbase to ensure that
  the cloud is published too.
  https://vanadium-review.googlesource.com/22043
- Similarly, the aforementioned CL is used to improve stability
  after a user's 2nd device joins the todo list. It won't crash if
  a local publish of Vanadium uses that patch.
  https://github.com/vanadium/issues/issues/1314

- If you run with vlog, the app runs out of memory eventually and
  crashes. This bug already existed though, IIRC.
- There are occasional errors in go-jni.
  "Error while importing keypair: -1
   panic: Reference 42975 doesn't exist"
  as well as
  "panic: runtime error: cgo argument has Go pointer to Go pointer"
  https://github.com/vanadium/issues/issues/1315

  This only starts to happen after syncing and seemingly occurs randomly.

Change-Id: If0c76ec52546f93fd1ab56e9ef0d8aeef06201f8
3 files changed
tree: 7c684be0af1ebffa9e88126555c1421b6a2b9c39
  1. app/
  2. gradle/
  3. .gitignore
  4. .jshintignore
  5. .jshintrc
  6. AUTHORS
  7. build.gradle
  8. CONTRIBUTING.md
  9. CONTRIBUTORS
  10. gradle.properties
  11. gradlew
  12. gradlew.bat
  13. LICENSE
  14. PATENTS
  15. README.md
  16. settings.gradle
  17. VERSION
README.md

TODOs demo: Syncbase and Firebase

This is a TODOs application for Android which uses either Firebase or Syncbase as a persistence layer.

Building & running

Switching between persistence layers

To switch between Firebase and Syncbase use: Build -> Select Build Variant and choose between the various options (e.g., firebaseDebug, syncbaseDebug etc.)

Firebase

The firebase app is at https://vivid-heat-7354.firebaseio.com/. Ross Wang and Alex Fandrianto manage the administration of the database.

WARNING: There is no authentication required in this demo, and the TODO list is global, accessible to all. In a real TODOs app this would not be the case of course. In the mean time, don't put anything sensitive there!