pebble
  • Tutorials
  • Get the SDK
  • Guides
  • Documentation
  • Examples
  • Blog
  • More
Privacy
Cookies
Publish

Pebble C API

  • Pebble C API
  • Pebble JavaScript API
  • PebbleKit JS
  • PebbleKit iOS
  • PebbleKit Android
  • Foundation
    • App
    • App Communication
    • App Glance
    • AppMessage
    • AppSync
    • AppWorker
    • DataLogging
    • DataStructures
      • UUID
    • Dictation
    • Dictionary
    • Event Service
      • AccelerometerService
      • AppFocusService
      • BatteryStateService
      • CompassService
      • ConnectionService
      • HealthService
      • TickTimerService
    • Exit Reason
    • Internationalization
    • Launch Reason
    • Logging
    • Math
    • Memory Management
    • Platform
    • Resources
      • File Formats
    • Rocky
    • Storage
    • Timer
    • Wakeup
    • Wall Time
    • WatchInfo
  • Graphics
    • Draw Commands
    • Drawing Paths
    • Drawing Primitives
    • Drawing Text
    • Fonts
    • Graphics Context
    • Graphics Types
      • Color Definitions
  • User Interface
    • Animation
      • PropertyAnimation
    • Clicks
    • Layers
      • ActionBarLayer
      • BitmapLayer
      • MenuLayer
      • RotBitmapLayer
      • ScrollLayer
      • SimpleMenuLayer
      • StatusBarLayer
      • TextLayer
    • Light
    • Preferences
    • UnobstructedArea
    • Vibes
    • Window
      • ActionMenu
      • NumberWindow
    • Window Stack
  • Standard C
    • Format
    • Locale
    • Math
    • Memory
    • String
    • Time

Preferences

Values recommended by the system.

Function Documentation

uint32_t preferred_result_display_duration(void)

Get the recommended amount of milliseconds a result window should be visible before it should automatically close.

Note

It is the application developer's responsibility to automatically close a result window.

Returns

The recommended result window timeout duration in milliseconds

PreferredContentSize preferred_content_size(void)

Returns the user's preferred content size representing the scale of all the app's UI components should use for display.

Returns

The user's PreferredContentSize setting.

bool quiet_time_is_active(void)

Users can toggle Quiet Time manually or on schedule. Watchfaces and apps should respect this choice and avoid disturbing actions such as vibration if quiet time is active.

Returns

True, if Quiet Time is currently active.

Enum Documentation

enum PreferredContentSize

PreferredContentSize represents the display scale of all the app's UI components. The enum contains all sizes that all platforms as a whole are capable of displaying, but each individual platform may not be able to display all sizes.

As of version 4.1, platforms other than Emery cannot display extra large and Emery itself cannot display small.

Enumerators

PreferredContentSizeSmall
PreferredContentSizeMedium
PreferredContentSizeLarge
PreferredContentSizeExtraLarge
NumPreferredContentSizes

Need some help?

Functions

  • preferred_result_display_duration
  • preferred_content_size
  • quiet_time_is_active

Enums

  • PreferredContentSize

Getting Help

Do you have questions about the Pebble SDK?

Do you need some help understanding something on this page?

You can either take advantage of our awesome developer community and check out the SDK Help forums, or you can send us a message through the website!