Package com.aurelienpierre.sioul
Class TextSend
java.lang.Object
com.aurelienpierre.sioul.TextSend
A text written on a computer, sent by this phone (docs/texts.md, "Never
twice"; Rust's side: crates/sioul-app/src/texts.rs). Rust has decided it
and written its key in the phone's private ledger, flushed to the disk,
before it asks here: a key is handed to Android once. Android splits it
(`divideMessage`), sends it from the SIM named, files it in the phone's
sent box with Sioul as its creator, so that the SMS app shows it in the
conversation, and retries by itself three times ("reject duplicates");
Sioul never retries. Each part's sent and delivered results come to
`Result`, which writes them in Java's own file (`results.jsonl`), flushed,
that Rust copies into the phone's outcomes. Java never writes a shared file.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAndroid's word on a part, sent or delivered, or on a multimedia message (in the background service's process): written, then a step soon. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final String(package private) static final StringThe provider's root for Sioul's private files (res/xml/qtprovider_paths.xml): the whole of getFilesDir().(package private) static final String(package private) static final StringJava's results, in Sioul's texts folder.(package private) static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidA line added to Java's results file, flushed to the disk.(package private) static Stringhex(byte[] bytes) Bytes in hex, two digits each; "" for none.(package private) static JSONObjectA part's result as Rust reads it (crates/sioul-app/src/texts.rs, `Result`): its key, "sent" or "delivered", which part of how many, Android's code (-1: done), the row it filed, the carrier's status for a delivery (TP-Status: under 0x20, received), when (ms).(package private) static SmsManagerThe SIM's own manager (`sub` ≥ 0), else the phone's default one.(package private) static JSONObjectA multimedia message's word as Rust reads it (crates/sioul-app/src/texts.rs,mms_outcomes): its key, "mms", Android's code (-1: done), the row it filed, the HTTP status, the carrier's answer (M-Send.conf) in hex, when (ms).private static PendingIntentA part's result, to `Result`: one of its own (its address names the key, the part, sent or delivered), mutable so that Android may add the row it filed ("uri") and the carrier's report ("pdu").private static PendingIntentpendingMms(Context context, String key) A multimedia message's word, toResult: an explicit intent of its own (its address names the key), mutable, so that Android may add the carrier's answer (SmsManager.EXTRA_MMS_DATA), the HTTP status and the row it filed ("uri"); from Android 14 a mutable intent must be explicit.(package private) static JSONObjectThe text handed to Android: {handed, parts} or {handed: false, reason}.(package private) static JSONObjectA multimedia message written on a computer, which Rust built on this phone (crates/sioul-core/src/mms.rs), measured against the SIM's carrier, and claimed in its ledger before it asks here: handed to Android by its address in Sioul's file provider, through which Android reads it (sendMultimediaMessage: SEND_SMS alone, no SMS role), from the SIM named, never with values of Sioul's over the carrier's.
-
Field Details
-
SENT
- See Also:
-
DELIVERED
- See Also:
-
MMS_SENT
- See Also:
-
FILES_ROOT
The provider's root for Sioul's private files (res/xml/qtprovider_paths.xml): the whole of getFilesDir().- See Also:
-
RESULTS
Java's results, in Sioul's texts folder.- See Also:
-
-
Constructor Details
-
TextSend
private TextSend()
-
-
Method Details
-
send
static JSONObject send(Context context, String key, String to, String body, int sub) throws JSONException The text handed to Android: {handed, parts} or {handed: false, reason}. The parts' intents name the key, so that each result finds its text.- Throws:
JSONException
-
sendMms
A multimedia message written on a computer, which Rust built on this phone (crates/sioul-core/src/mms.rs), measured against the SIM's carrier, and claimed in its ledger before it asks here: handed to Android by its address in Sioul's file provider, through which Android reads it (sendMultimediaMessage: SEND_SMS alone, no SMS role), from the SIM named, never with values of Sioul's over the carrier's. Android files it in the sent box with Sioul as its creator and its key astr_id; its word, with the carrier's answer, comes toResultby an explicit, mutable intent (Android adds its extras to it). {handed} or {handed: false, reason}.- Throws:
JSONException
-
pendingMms
A multimedia message's word, toResult: an explicit intent of its own (its address names the key), mutable, so that Android may add the carrier's answer (SmsManager.EXTRA_MMS_DATA), the HTTP status and the row it filed ("uri"); from Android 14 a mutable intent must be explicit. -
mmsLine
static JSONObject mmsLine(String key, int code, String uri, int http, byte[] conf, long at) throws JSONException A multimedia message's word as Rust reads it (crates/sioul-app/src/texts.rs,mms_outcomes): its key, "mms", Android's code (-1: done), the row it filed, the HTTP status, the carrier's answer (M-Send.conf) in hex, when (ms). Pure: android/jvm-checks/TextsCheck.java.- Throws:
JSONException
-
hex
Bytes in hex, two digits each; "" for none. -
manager
The SIM's own manager (`sub` ≥ 0), else the phone's default one. -
pending
private static PendingIntent pending(Context context, String action, String key, int part, int parts) A part's result, to `Result`: one of its own (its address names the key, the part, sent or delivered), mutable so that Android may add the row it filed ("uri") and the carrier's report ("pdu"). -
line
static JSONObject line(String key, String kind, int part, int parts, int code, String uri, int status, long at) throws JSONException A part's result as Rust reads it (crates/sioul-app/src/texts.rs, `Result`): its key, "sent" or "delivered", which part of how many, Android's code (-1: done), the row it filed, the carrier's status for a delivery (TP-Status: under 0x20, received), when (ms).- Throws:
JSONException
-
append
A line added to Java's results file, flushed to the disk.
-