ensureCapabilities

abstract fun ensureCapabilities(supportedCapabilities: List<DeviceCapability>): LocalDevice

Ensure that the device record has a specific set of capabilities.

💾 This method alters the persisted account state.

This method checks that the currently-registered device record is advertising the given set of capabilities in the FxA "device commands" ecosystem. If not, then it updates the device record to do so.

Applications should call this method on each startup as a way to ensure that their expected set of capabilities is being accurately reflected on the FxA server, and to handle the rollout of new capabilities over time.

Arguments

- `supported_capabilities` - the set of [capabilities](DeviceCapability) to register
   for this device in the "device commands" ecosystem.

Notes

- Device registration is only available to applications that have been
  granted the `https:///identity.mozilla.com/apps/oldsync` scope.