Since

4.3.1

Helps to detect call states. Required Permissions.android#phone permission for Android.

Example

import CallDetection from '@smartface/native/device/calldetection';

const callDetection = new CallDetection();
callDetection.onCallStateChanged = (params) => {
console.log(params);
};

Hierarchy

Properties

_nativeObject: any

Accessors

  • get nativeObject(): any
  • Returns any

  • set nativeObject(value: any): void
  • Parameters

    • value: any

    Returns void

  • get ios(): TProps["ios"]
  • Returns TProps["ios"]

  • get android(): TProps["android"]
  • Returns TProps["android"]

Methods

  • Executed before everything. This should return nativeObject since it will be assinged directly to nativeObject.

    Parameters

    • Optional params: Partial<Record<string, any>>

    Returns any

  • Parameters

    Returns void

  • Parameters

    Returns void

  • Parameters

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    Returns (() => void)

      • (): void
      • Returns void

  • Parameters

    Returns void

  • Parameters

    • event: "callStateChanged"
    • Rest ...args: any[]

    Returns void

  • Parameters

    • Optional params: Partial<Record<string, any>>

    Returns void

  • Parameters

    • props: Partial<{ [key: string]: any }>

    Returns void

  • Parameters

    • props: Partial<{ [key: string]: any }>

    Returns void

Events

onCallStateChanged: ((e: { state: State; observer?: any }) => void)

Type declaration

    • (e: { state: State; observer?: any }): void
    • Triggers when device call state changes.

      Since

      4.3.1 onCallStateChanged

      Android

      Ios

      Deprecated

      Example

      import CallDetection from '@smartface/native/device/calldetection';

      const callDetection1 = new CallDetection();
      callDetection1.on(CallDetection.Events.CallStateChanged, (params) => {
      console.info('onCallStateChanged', params);
      });

      Parameters

      • e: { state: State; observer?: any }
        • state: State
        • Optional observer?: any

      Returns void

Generated using TypeDoc