* notification ringing, settings screen, native code patch, ringing mp3s * i18n * play preview on first press * prevent playing from background (only affects Android) to match iOS beh * stop ringing/vibration on entering background * ring when coming back from background and new incoming call is present * no push notification sound when it's a call; improve ringing * move sounds to asset folder; copy on postinstall for android bundling * make Ringtone type a string enum * make Android ring async + await ring and stop; changes from PR comments * missing fields after merge * release lock on an exception * cancel sample ringing when turning notifications off * copy sound files for android build * typo * update snapshots * testing if the problem is copying the mp3 files * fix android mp3 assets when building for non-release * add sounds to .gitignore --------- Co-authored-by: Mattermost Build <build@mattermost.com> Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
73 lines
1.8 KiB
TypeScript
73 lines
1.8 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
// Type definitions for react-native-incall-manager 3.2
|
|
// Project: https://github.com/zxcpoiu/react-native-incall-manager#readme
|
|
// Definitions by: Carlos Quiroga <https://github.com/KarlosQ>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
// TypeScript Version: 2.8
|
|
|
|
declare module 'react-native-incall-manager' {
|
|
export interface StartSetup {
|
|
media?: string | undefined;
|
|
auto?: boolean | undefined;
|
|
ringback?: string | undefined;
|
|
}
|
|
|
|
export interface StopSetup {
|
|
busytone?: string | undefined;
|
|
}
|
|
|
|
export class InCallManager {
|
|
start(setup?: StartSetup): void;
|
|
|
|
stop(setup?: StopSetup): void;
|
|
|
|
turnScreenOff(): void;
|
|
|
|
turnScreenOn(): void;
|
|
|
|
getIsWiredHeadsetPluggedIn(): Promise<any>;
|
|
|
|
setFlashOn(enable?: boolean, brightness?: number): number;
|
|
|
|
setKeepScreenOn(enable?: boolean): void;
|
|
|
|
setSpeakerphoneOn(enable?: boolean): void;
|
|
|
|
setForceSpeakerphoneOn(_flag?: boolean): void;
|
|
|
|
setMicrophoneMute(enable?: boolean): void;
|
|
|
|
startRingtone(
|
|
ringtone?: string,
|
|
vibrate_pattern?: any[],
|
|
ios_category?: string,
|
|
seconds?: number
|
|
): Promise<void>;
|
|
|
|
stopRingtone(): Promise<void>;
|
|
|
|
startProximitySensor(): void;
|
|
|
|
stopProximitySensor(): void;
|
|
|
|
startRingback(ringback?: string): void;
|
|
|
|
stopRingback(): void;
|
|
|
|
pokeScreen(_timeout?: number): void;
|
|
|
|
getAudioUri(audioType: string, fileType: string): any;
|
|
|
|
chooseAudioRoute(route: any): Promise<any>;
|
|
|
|
requestAudioFocus(): void;
|
|
|
|
abandonAudioFocus(): void;
|
|
}
|
|
|
|
declare const _default: InCallManager;
|
|
|
|
export default _default;
|
|
}
|