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

    Interface FeatureHooks

    The moments in the app's life a feature can act on. Every hook is optional.

    interface FeatureHooks {
        requests?: string[];
        configOpened?(): void;
        configSaved?(): void;
        message?(payload: Record<string, number | string>): void;
        ready?(): void;
        refresh?(slow: boolean): void;
    }
    Index
    requests?: string[]

    The watch's request keys this feature answers, by name, such as WEATHER_REQUEST. The app logs one warning for a request no listed feature answers, which is how a face that declares a feature's keys but never opted into it finds out.

    • The settings page is about to open, while the old settings are still the saved ones.

      Returns void

    • The settings page closed and its new settings are saved.

      Returns void

    • A message arrived from the watch. Each key the face declares can be read by its number, whichever way the phone keyed it.

      Parameters

      • payload: Record<string, number | string>

      Returns void

    • PebbleKit JS is ready, and the settings request has gone out.

      Returns void

    • The background refresh ticked. slow is true on the less frequent ticks, the ones meant for data that changes slowly, such as weather.

      Parameters

      • slow: boolean

      Returns void