tree: 98e7c0da9663a6be8429c0ef746148a011677138 [path history] [tgz]
  1. app/
  2. gradle/
  3. .gitignore
  4. build.gradle
  5. gradle.properties
  6. gradlew
  7. gradlew.bat
  8. README.md
  9. settings.gradle
projects/moments/README.md

moments - a cloudless photo sharing app

This app is an example of running, advertising and scanning for multiple Vanadium services on Android.

A user runs the app, using it to take photos, building up a list of photos to share. The UX presents each photo with an advertise switch. The app itself has an overall scan switch. When scanning, the app sees and displays photos advertised by other nearby devices.

A photo's advertisement travels over wifi and/or BLE, and contains minimal information about the photo, e.g. a caption, some hint of who is advertising the photo, and the address of a service to use to get the actual photo via RPC. A photo, even a thumbnail, is too large to send as an advertisement payload, hence the need for the service and RPC.

Every photo is served by its own service. This facilitates creation of multiple scan targets to exercise discovery code. One can turn scanning on/off, and turn advertising on/off on a per photo basis to see the impact on the UX of the devices involved.

Build and install

Connect a developer-enabled device via USB to your workstation.

Then, for example:

cd ~/vanadium/release/java/projects/moments
./gradlew assembleDebug
adb install app/build/outputs/apk/app-debug.apk
adb shell am start -n io.v.moments/io.v.moments.ux.MainActivity