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
27 lines
806 B
Java
27 lines
806 B
Java
package me.teafry.voipmessages;
|
|
|
|
import android.content.BroadcastReceiver;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
|
|
/**
|
|
* SmsManager saying an MMS download finished. Apart from MmsReceiver because
|
|
* that one only takes broadcasts from holders of BROADCAST_WAP_PUSH, and this
|
|
* one comes from our own PendingIntent.
|
|
*/
|
|
public final class MmsDownloaded extends BroadcastReceiver {
|
|
@Override
|
|
public void onReceive(Context c, Intent intent) {
|
|
Context app = c.getApplicationContext();
|
|
int result = getResultCode();
|
|
PendingResult done = goAsync();
|
|
new Thread(() -> {
|
|
try {
|
|
Sim.downloaded(app, intent, result);
|
|
} finally {
|
|
done.finish();
|
|
}
|
|
}, "mms-in").start();
|
|
}
|
|
}
|