Options
All
  • Public
  • Public/Protected
  • All
Menu

SendbirdCallsModule class for SendbirdCalls

Hierarchy

  • SendbirdCallsModule

Implements

Index

Constructors

Accessors

  • get Logger(): { error: ((...args: unknown[]) => number); getLogLevel: (() => "none" | "error" | "warning" | "info"); info: ((...args: unknown[]) => number); setLogLevel: ((level: "none" | "error" | "warning" | "info") => void); warn: ((...args: unknown[]) => number) }
  • Returns the SDK Logger

    since

    1.0.0

    Returns { error: ((...args: unknown[]) => number); getLogLevel: (() => "none" | "error" | "warning" | "info"); info: ((...args: unknown[]) => number); setLogLevel: ((level: "none" | "error" | "warning" | "info") => void); warn: ((...args: unknown[]) => number) }

    • error: ((...args: unknown[]) => number)
        • (...args: unknown[]): number
        • Parameters

          • Rest ...args: unknown[]

          Returns number

    • getLogLevel: (() => "none" | "error" | "warning" | "info")
        • (): "none" | "error" | "warning" | "info"
        • Returns "none" | "error" | "warning" | "info"

    • info: ((...args: unknown[]) => number)
        • (...args: unknown[]): number
        • Parameters

          • Rest ...args: unknown[]

          Returns number

    • setLogLevel: ((level: "none" | "error" | "warning" | "info") => void)
        • (level: "none" | "error" | "warning" | "info"): void
        • Parameters

          • level: "none" | "error" | "warning" | "info"

          Returns void

    • warn: ((...args: unknown[]) => number)
        • (...args: unknown[]): number
        • Parameters

          • Rest ...args: unknown[]

          Returns number

  • get NATIVE_VERSION(): string
  • get VERSION(): string
  • get applicationId(): string
  • get currentUser(): null | User
  • get initialized(): boolean

Methods

  • addDirectCallSound(type: SoundType, fileName: string): void
  • Adds sound used in DirectCall such as ringtone and some sound effects with its file name with extension

    ios

    bundle file name

    android

    res/raw file name

    since

    1.0.0

    Parameters

    Returns void

  • android_handleFirebaseMessageData(data?: Record<string, string>): boolean
  • Handles Firebase message data. Returns true if Sendbird call message. Otherwise false.

    platform

    Android

    since

    1.0.0

    Parameters

    • Optional data: Record<string, string>

    Returns boolean

  • deauthenticate(): Promise<void>
  • fetchRoomById(roomId: string): Promise<Room>
  • Fetches a room instance from Sendbird server.

    since

    1.0.0

    Parameters

    • roomId: string

    Returns Promise<Room>

  • getCachedRoomById(roomId: string): Promise<null | Room>
  • Gets a locally-cached room instance by room ID.

    since

    1.0.0

    Parameters

    • roomId: string

    Returns Promise<null | Room>

  • getCurrentUser(): Promise<null | User>
  • Gets the current User from native Returns the current User. If SendbirdCalls is not authenticated, null will be returned.

    since

    1.0.0

    Returns Promise<null | User>

  • getDirectCall(callId: string): Promise<DirectCall>
  • initialize(appId: string): boolean
  • Initializes SendbirdCalls.

    since

    1.0.0

    Parameters

    • appId: string

    Returns boolean

  • ios_registerVoIPPushToken(token: string, unique?: boolean): Promise<void>
  • To receive native-like calls while an app is in the background or closed, a device registration token must be registered to the server. Register a device push token after authentication has completed using the SendbirdCalls.ios_registerVoIPPushToken() method.

    platform

    iOS

    since

    1.0.0

    Parameters

    • token: string
    • unique: boolean = true

    Returns Promise<void>

  • ios_routePickerView(): void
  • ios_unregisterVoIPPushToken(token: string): Promise<void>
  • Unregisters a VoIP push token of specific device. You will not receive VoIP push notification for a call anymore.

    platform

    iOS

    since

    1.0.0

    Parameters

    • token: string

    Returns Promise<void>

  • registerPushToken(token: string, unique?: boolean): Promise<void>
  • Registers push token for current user.

    on iOS, push token means APNS token. on Android, push token means FCM token.

    if (Platform.OS === 'android') {
    const fcmToken = await messaging().getToken();
    await SendbirdCalls.registerPushToken(fcmToken);
    }
    if (Platform.OS === 'ios') {
    const apnsToken = await messaging().getAPNSToken();
    await SendbirdCalls.registerPushToken(apnsToken);
    }
    since

    1.0.0

    Parameters

    • token: string
    • unique: boolean = true

    Returns Promise<void>

  • setDirectCallDialingSoundOnWhenSilentOrVibrateMode(enabled: boolean): void
  • Enables / disables dial sound used in DirectCall even when the device is in silent mode. Call this method right after addDirectCallSound.

    since

    1.0.0

    Parameters

    • enabled: boolean

    Returns void

  • setLoggerLevel(level: "none" | "error" | "warning" | "info"): void
  • Set logger level

    since

    1.1.0

    Parameters

    • level: "none" | "error" | "warning" | "info"

    Returns void

  • unregisterPushToken(token: string): Promise<void>
  • Unregisters push token for current user.

    since

    1.0.0

    Parameters

    • token: string

    Returns Promise<void>

Generated using TypeDoc