🚴
COBI.Bike
  • Introduction
  • Getting up and running
  • Namespaces
    • App
      • Theme
      • Text to Speech
      • Read Later
      • Language
      • Contact
      • Touch Interaction Enabled
      • Hub Location
      • Clock Visible
      • Is Dark
      • Is Hub Connected
    • Parameters
      • Language
      • Context
      • SDK Version
    • Hub
      • Motor Interface Ready
      • Bell Ringing
      • External Interface Action
      • Ambient Light State
    • Battery
      • State
    • Battery Two
      • State
    • Battery Controller
      • Slots
      • State
    • Motor
      • Serialnumber
      • Distance
      • Assistance Indicator
      • Range
      • Supported Drive Modes
      • Drive mode
      • Next Service
      • Power On Time
    • Mobile
      • Location
      • Heading
      • Location Availability
    • Navigation Service
      • Route
      • Eta
      • Distance To Destination
      • Status
      • Control
    • User
      • Temperature Unit
      • Length Unit
    • Bike
      • Type
    • Ride Service
      • Speed
      • User Power
      • User Power Availability
      • Heart Rate
      • Heart Rate Availability
      • Cadence
      • Cadence Availability
    • Tour Service
      • Calories
      • Ascent
      • Riding Distance
      • Riding Duration
      • Average Speed
    • Devkit
      • Override ThumbController Mapping
  • Entities
    • Theme
    • RgbColor
    • TextToSpeechContent
    • ReadLaterItem
    • ContactData
    • ExternalInterfaceAction
    • AmbientLightState
    • BatteryCondition
      • BatteryState
    • BatterySlots
    • ServiceTrigger
    • Location
    • Coordinate
    • Route
    • NavigationStatus
    • NavigationCommand
      • NavigationAction
    • TemperatureUnit
    • MeasurementUnit
    • BikeType
    • Placemark
      • PlacemarkCategory
Powered by GitBook
On this page
  1. Namespaces
  2. Parameters

Context

PreviousLanguageNextSDK Version

Last updated 2 years ago

Get the current context that the module should reflect.

const context: 'onRide' | 'offRide' | 'onRideSettings' | 'offRideSettings' = COBI.parameters.context();
const context = COBI.parameters.context();

The context can be any of the following values:

Context
Meaning
Context
Meaning
Context
Meaning
Context
Meaning

onRide

Set during the riding phase.

Show information relevant during the ride (e.g. live metrics) and offer interaction that is optimized for the short attention time while riding.

offRide

Set in the pre- and post-riding phase.

Allow the user to prepare his next ride, give him an overview of what he can expect during the riding phase or information about his last ride or offer services that are not relevant during the riding phase (e.g. maintenance)

onRideSettings

Set when the user accesses the settings during the riding phase. Allow the user to quickly adjust important settings while he is on the go.

Those settings should be targeted to COBI.context.onRide experience.

offRideSettings

Set when the user accesses the settings during the pre- and post-riding phase.

Offer more in-depth settings that are either targeted to COBI.context.offRide or both experiences (depending on how your module is structured)