• Preparing search index...
  • The search index is not available
@deep-foundation/capacitor-motion
  • @deep-foundation/capacitor-motion
  • subscribeToOrientationChanges

Function subscribeToOrientationChanges

  • subscribeToOrientationChanges(this, options): Promise<PluginListenerHandle>
  • Subscribes to orientation changes and saves them

    Parameters

    • this: MotionDecorator
    • options: SubscribeToMotionChangesOptions

    Returns Promise<PluginListenerHandle>

    Remarks

    Motion permissions should be granted before calling this function by using requestMotionPermissions Orientation data is saved by using makeMotionValueUpdateOperations with GetMotionInsertSerialOperationsOptions.containerLinkId set to SubscribeToMotionChangesOptions.deviceLinkId

    Example

    #### Subscribe to orientation changes
    ```ts
    const newOrientationHandler = await subscribeToOrientationChanges({
    deviceLinkId,
    });
    
    
    • Defined in src/subscribe-to-orientation-changes.ts:25

Settings

Member Visibility

Theme

@deep-foundation/capacitor-motion
  • Loading...

Generated using TypeDoc