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

    Interface PluginChoice

    One kind's subscription and the saved choice it follows.

    interface PluginChoice {
        subscription: SourceSubscription;
        couldAnswer(): boolean;
        follow(how?: FollowOptions): boolean;
        hasPluginCalls(): boolean;
        opened(): void;
        picked(): boolean;
        pickMoved(picked: boolean): boolean;
        seed(config: Record<string, unknown>): void;
        serves(): boolean;
    }
    Index
    subscription: SourceSubscription

    The subscription, for its kept update, its saved state, and the plugin list.

    • Whether a plugin on the phone could answer now. That is a list serving the item, or a list the phone will not give, since the phone may still route a subscription to a plugin it does not list.

      Returns boolean

      False only for a list read as having nothing that serves the item.

    • Brings the subscription in line with the choice.

      Parameters

      • Optionalhow: FollowOptions

        What to do with a subscription already started for a picked plugin. Left out, nothing.

      Returns boolean

      Whether the plugin is picked.

    • Whether the phone has the plugin calls at all. A phone with plugins switched off still has them and lists nothing, which reads the same as a plugin removed since the pick. Only a Pebble app from before plugins has no list call.

      Returns boolean

      False only for a phone with no plugin list call.

    • Notes whether the plugin is picked as the settings page opens, for pickMoved once it saves.

      Returns void

    • Whether the plugin is picked, read from the settings a seed is about to save while it runs.

      Returns boolean

    • Whether a save moved the choice onto or off the plugin since the page opened. A choice never saved can move with no saved value changing, such as a fresh install on the plugin saving the face's default, so the saved values alone cannot say. With no open noted it reads as moved, the way a settings watch reads a save with no snapshot. It forgets the note.

      Parameters

      • picked: boolean

        Whether the plugin is picked after the save.

      Returns boolean

      True when the choice moved, or when no open was noted.

    • Follows the choice in the settings a seed is about to save, which the saved settings do not hold yet. The seed saves straight after its hooks and nothing else may follow it, so a plugin it brings back starts here.

      Parameters

      • config: Record<string, unknown>

        The settings the seed is about to save.

      Returns void

    • Whether a plugin on the phone served the item when the list was last read, which is when the choice was last followed, the page opened, or an error arrived. A list the phone will not give does not count, since nothing says a plugin is there, and leaves the last answer standing.

      Returns boolean

      True only for the last list read as serving the item.