v0.3.0: bubble for Android 0.3.0 — texts over the Rabbit's own SIM card

A third source next to voip.ms and Google Voice, while bubble is Android's
default SMS app (Settings → SIM card asks for the role). SMS and MMS in and
out, group chats as MMS, the phone's existing texts imported, and Android's
message store kept as the record so another app still agrees.

- Sim: role check, sending (SmsManager, waits for the radio), receiving,
  chunked import from content://sms and content://mms
- Pdu: MMS wire format (notification-ind, retrieve-conf, send-req, ack)
- SmsReceiver, MmsReceiver, MmsDownloaded, MmsFiles, RespondService,
  SendToActivity: what Android requires of a default SMS app
- The import no longer shares a lock with Config.get, which froze the screens
  on the first copy of a long history
This commit is contained in:
2026-11-06 17:18:58 -08:00
parent 8c84feaa91
commit 94188a42c7
24 changed files with 1626 additions and 17 deletions
@@ -64,7 +64,7 @@ public final class NewChatActivity extends BaseActivity {
int sel = 0;
for (int i = 0; i < cfg.dids.size(); i++) {
Config.Did d = cfg.dids.get(i);
labels.add(Phone.format(d.did) + (d.gv ? " — Google Voice" : ""));
labels.add(Ui.didLabel(this, d));
if (d.did.equals(from)) sel = i;
}
sp.setAdapter(new ArrayAdapter<>(this, android.R.layout.simple_spinner_dropdown_item, labels));
@@ -73,7 +73,7 @@ public final class NewChatActivity extends BaseActivity {
public void onItemSelected(AdapterView<?> p, View v, int pos, long id) {
if (!cfg.dids.get(pos).did.equals(from)) fromChosen = true;
from = cfg.dids.get(pos).did;
if (!cfg.isGv(from)) {
if (!cfg.canGroup(from)) {
members.clear();
renderChips();
}
@@ -237,7 +237,7 @@ public final class NewChatActivity extends BaseActivity {
main.addView(Ui.bold(Ui.text(c, o[1] != null ? o[1] : Phone.format(o[0]), Ui.T_NAME, Ui.TEXT)));
main.addView(Ui.text(c, o[1] != null ? Phone.format(o[0]) + (o[2] != null ? " · " + o[2] : "") : "Send to this number", Ui.T_SMALL, Ui.MUTED));
row.addView(main, new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.WRAP_CONTENT, 1));
if (Config.get(c).isGv(from) && members.isEmpty()) {
if (Config.get(c).canGroup(from) && members.isEmpty()) {
TextView plus = Ui.text(c, "+ Group", Ui.T_TINY, Ui.MUTED);
plus.setBackground(Ui.round(Ui.INPUT, Ui.dp(c, 24)));
plus.setPadding(Ui.dp(c, 16), Ui.dp(c, 10), Ui.dp(c, 16), Ui.dp(c, 10));