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

    Function createSourceSubscription

    • Makes the one subscription a feature holds for a category and item.

      Nothing subscribes until start(). From then the unit is in plugin mode until stop(), and the slow tick's retryIfIdle() starts it again whenever the phone has ended it or never started it. While it sits idle in plugin mode it also tries again every QUICK_RETRY_MS on its own, until a subscription is live or stop() is called. It has QUICK_RETRY_WINDOW_MS of such retries from a start or a retrySoon(), spent only while it sits idle, so a subscription that ends long after it went live still gets its quick retries then. With quickRetry: false it never retries on its own, and tries again only when the slow tick or a retrySoon() asks.

      Every idle subscription shares one quick retry timer, which runs while any of them has retries left and stops when none has. Each keeps its own window.

      Parameters

      • options: SubscriptionOptions

        The category and item, the properties the feature reads, where updates and errors go, and whether the quick retry runs.

      Returns SourceSubscription

      The subscription, idle until started.