@types/react-native-incall-manager
TypeScript icon, indicating that this package has built-in type declarations

4.0.3 • Public • Published

Installation

npm install --save @types/react-native-incall-manager

Summary

This package contains type definitions for react-native-incall-manager (https://github.com/zxcpoiu/react-native-incall-manager#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-native-incall-manager.

index.d.ts

export interface StartSetup {
    media?: "video" | "audio" | undefined;
    auto?: boolean | undefined;
    ringback?: string | undefined;
}

export interface StopSetup {
    busytone?: string | undefined;
}

declare class InCallManager {
    start(setup?: StartSetup): void;

    stop(setup?: StopSetup): void;

    turnScreenOff(): void;

    turnScreenOn(): void;

    getIsWiredHeadsetPluggedIn(): Promise<{ isWiredHeadsetPluggedIn: boolean }>;

    setFlashOn(enable?: boolean, brightness?: number): void;

    setKeepScreenOn(enable?: boolean): void;

    setSpeakerphoneOn(enable?: boolean): void;

    setForceSpeakerphoneOn(_flag?: boolean): void;

    setMicrophoneMute(enable?: boolean): void;

    startRingtone(
        ringtone?: string,
        vibrate_pattern?: number[],
        ios_category?: "playback" | "default",
        seconds?: number,
    ): void;

    stopRingtone(): void;

    startProximitySensor(): void;

    stopProximitySensor(): void;

    startRingback(ringback?: string): void;

    stopRingback(): void;

    pokeScreen(_timeout?: number): void;

    getAudioUri(
        audioType: "ringtone" | "ringback" | "busytone",
        fileType: string,
    ): Promise<string | null>;

    chooseAudioRoute(
        route: "EARPIECE" | "SPEAKER_PHONE" | "WIRED_HEADSET" | "BLUETOOTH",
    ): Promise<{ availableAudioDeviceList: string; selectedAudioDevice: string }>;

    requestAudioFocus(): Promise<string | undefined>;

    abandonAudioFocus(): Promise<string | undefined>;
}

declare const _default: InCallManager;

export default _default;

Additional Details

  • Last updated: Tue, 07 Nov 2023 09:09:39 GMT
  • Dependencies: none

Credits

These definitions were written by Carlos Quiroga.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/react-native-incall-manager

Weekly Downloads

2,089

Version

4.0.3

License

MIT

Unpacked Size

5.86 kB

Total Files

5

Last publish

Collaborators

  • types