Class MailShortcuts

java.lang.Object
com.aurelienpierre.sioul.MailShortcuts

final class MailShortcuts extends Object
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
    Modifier and Type
    Field
    Description
    (package private) static final String
    The share sheet's category for them, as res/xml/sioul_shortcuts.xml names it.
    private static final String
     
    private static final String
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    private static boolean
    missing(ShortcutManager manager, String json)
    Whether shortcuts given before are gone (Sioul's data cleared, a restore): then given again.
    (package private) static void
    set(Context context, String json)
    Rust's list, published when it differs from the last one given.
    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).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • set

      static void set(Context context, String json)
      Rust's list, published when it differs from the last one given. Any thread.
    • missing

      private static boolean missing(ShortcutManager manager, String json)
      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).