Pebble App Framework: Phone API
    Preparing search index...

    Interface SourceSubscription

    One feature's live subscription, as subscription.ts builds it.

    interface SourceSubscription {
        latest(): SourceEnvelope | null;
        live(): boolean;
        plugins(): PluginSummary[] | null;
        retryIfIdle(): void;
        retrySoon(): void;
        start(): void;
        state(): SourceState;
        stop(): void;
    }
    Index
    • Whether a subscription is running that the phone has not ended.

      Returns boolean

    • The installed plugins, an empty list when the phone has none or no plugin calls at all, or null when its list call throws or answers with something that is not a list. Unreadable is not empty, since the phone may still route a subscription to a plugin it would not list.

      Returns PluginSummary[] | null

    • Starts again only while in plugin mode with nothing live. The slow tick calls it, and the unit runs the same retry on its own every QUICK_RETRY_MS while it sits idle in plugin mode. It has QUICK_RETRY_WINDOW_MS of those from a start or a retrySoon(), spent only while it sits idle, so a subscription that ends long after it went live still gets them then.

      Returns void

    • Gives the quick retry its whole window again, for a wearer who is setting up a plugin right now, such as one who just opened the settings page or saved the plugin as the source. It starts the retry if the unit sits idle in plugin mode, and does nothing else. With the quick retry off it tries once, the same as retryIfIdle.

      Returns void

    • Ends any live subscription, then subscribes again unless the plugin list says nothing serves the item.

      Returns void

    • Ends the subscription and leaves plugin mode, so neither the slow tick nor the quick retry brings it back.

      Returns void