Files
bubble/android/README.md
T
trav 8c84feaa91 v0.2.0: bubble for Android 0.2.0 — chat search, swipe for unread, faster chat opening
Desktop:
- Search lists chats whose own name matches first, so a named group
  isn't pushed out of the top 8 by chats that merely include a member.

Android (Rabbit R1) app, 0.2.0:
- Pull the chat list past its top for a search box (name, person,
  number, then group members; archived chats too; Back clears it).
- Swipe right to left marks a chat unread / read over a magenta band;
  left to right still archives (SwipeActions replaces SwipeArchive).
- Google Voice chats don't offer voice notes in the paperclip bubble.
- Chats open with their newest 60 messages, then the full history;
  marking read (and the Google Voice network call) waits until they're
  on screen. Cached pictures show at once, and one slow download no
  longer blocks the other images. Fixed a contacts reload race.
- Sandbox data gains filler chats, a named group and a 4,000-message chat.

Also: the Android app, Google Voice support, media, export, emoji and
the other work since the first commit, and a CLAUDE.md carrying the
privacy rule.
2026-11-06 02:19:56 -08:00

3.9 KiB

bubble for Android (Rabbit R1)

The desktop app's companion: the same conversations, both numbers (voip.ms and Google Voice), group chats, photos, and chat names, on a Rabbit R1. Plain Java with no libraries and no Gradle, built like andTunes (~/Documents/lintunes/andtunes, whose README and DEVICE.md cover the toolchain and the R1's screen quirks: everything here is about double a stock size).

Getting it onto the Rabbit

Use the desktop app: Settings → Rabbit → Install to Rabbit. It installs the APK bundled with the desktop app, exempts it from Doze (so background checks keep their interval), and copies into the app's private storage:

  • files/config.json: voip.ms API login, Google Voice number and sign-in cookies, the voip.ms numbers to use, the default number
  • files/messages.db: the desktop's history (same schema, minus the FTS5 search index Android's SQLite can't open)
  • files/media/: cached photos and attachments
  • files/state-in.json: chat names and read/unread/archived, merged both ways (newest change wins; the app keeps its side in files/state.json)

Sync to Rabbit copies the accounts again and merges names and read state without touching the history. Everything goes in through adb shell -T "run-as …", which is why the APK is debuggable.

Building

python3 android/build.py            # -> android/build/release/VoipMessages.apk
python3 android/build.py --ship     # ... + copy into resources/android/ (npm run android)

npm run install-desktop ships it before building the AppImage.

Testing without real messages

A separate dev app (me.teafry.voipmessages.dev, "bubble (dev)" on the launcher) has its own data, so it never touches the real one:

python3 android/build.py --dev --install
python3 android/tools/push_sandbox.py     # made-up conversations; never goes online

Or run the desktop in its sandbox (VOIPMS_SANDBOX=/tmp/x npm run dev): its Install/Sync buttons then target the dev app with the sandbox's made-up data.

How it works

  • Store: the desktop's SQLite schema; Sync: checks voip.ms (last day) and Google Voice (thread list) like the desktop's polling; Sender: the desktop's send-and-retry rules.
  • GVoice/Pb/Waa: the desktop's Google Voice client ported to Java (message ids hash identically, so copied history and new messages line up).
  • Background: Alarms (AlarmManager, interval from Settings, "Never" = pull to refresh only) → PollJob → notifications for new incoming messages.
  • The launcher icon is bubble.jpg cut to just the bubble (transparent outside an ellipse fitted to the rim's outer edge, pixels inside untouched), at 192 px in res/drawable-nodpi/ic_launcher.png. The desktop's resources/icon.png keeps the full square photo.
  • 📎: press it and Camera / Photo / Voice note bubble out of it (AttachBubble); drag onto one and let go, or tap the clip and then tap one. Camera shots go through the Rabbit's camera app into MediaStore and are deleted from the gallery once they're in the tray.
  • Voice notes (📎 → Voice note): VoiceActivity records AAC .m4a (32 kbit/s, 3 min cap, under Media.BUDGET) and sends it as an MMS. voip.ms numbers only: Google Voice's sendsms takes image types and nothing else, so a Google Voice chat's bubble has no microphone.
  • Search: pull the chat list down past its top for the search box (it hides again on Back). Matches what a chat is called (your name for it, the person, a number), then group chats with a matching member; archived too.
  • Swipes (SwipeActions): left to right archives (blue band), right to left marks unread or read (magenta band).
  • Opening a chat shows its newest 60 messages first, then the full history; marking it read (and telling Google Voice) waits until it's on screen.
  • The scroll wheel is left alone: it stays the volume control (and volume down + the side button still takes a screenshot).