Package com.aurelienpierre.sioul
Class MailShortcuts
java.lang.Object
com.aurelienpierre.sioul.MailShortcuts
Sioul's addresses that can send, published to Android (docs/android.md,
"Sharing"): one shortcut each, which the share sheet offers as a direct
target from Android 10 (its
<share-target> in res/xml/sioul_shortcuts.xml
matches their category), and a long press on Sioul's icon as "Write from
you@example.org". Chosen, ShareActivity makes the draft from that address.
Rust gives the list whenever it changes (crates/sioul-app/src/outside.rs,
android/main.cpp): JSON {accounts: [{id, short, long}], gone}, the most
used first. Only Sioul's own "mail:" shortcuts are touched; the "Pause"
one (the manifest's) stays. Only the address shows in them: nothing else
of the account, and nothing is sent until you press Send.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanmissing(ShortcutManager manager, String json) Whether shortcuts given before are gone (Sioul's data cleared, a restore): then given again.(package private) static voidRust's list, published when it differs from the last one given.private static ShortcutInfoOne address's shortcut: under its icon in the share sheet, the address; at a long press on Sioul's icon, "Write from …", which opens a new message from it (ShareActivity, as a mailto: link would).
-
Field Details
-
CATEGORY
The share sheet's category for them, as res/xml/sioul_shortcuts.xml names it.- See Also:
-
KEPT
- See Also:
-
GIVEN
- See Also:
-
-
Constructor Details
-
MailShortcuts
private MailShortcuts()
-
-
Method Details
-
set
Rust's list, published when it differs from the last one given. Any thread. -
missing
Whether shortcuts given before are gone (Sioul's data cleared, a restore): then given again. -
shortcut
private static ShortcutInfo shortcut(Context context, String id, String label, String longLabel, int rank) One address's shortcut: under its icon in the share sheet, the address; at a long press on Sioul's icon, "Write from …", which opens a new message from it (ShareActivity, as a mailto: link would).
-