Hiyve Components - v1.0.0
    Preparing search index...

    Function requestCameraAndMicPermissions

    • Request camera and microphone permissions from the operating system.

      On Android, prompts the user to grant CAMERA and RECORD_AUDIO permissions via the native dialog. On iOS, returns true immediately because react-native-webrtc handles permission prompts automatically when the camera or microphone is first accessed.

      For a reactive hook-based API, use usePermissions instead.

      Returns Promise<boolean>

      true if both camera and microphone permissions are granted, false otherwise

      import { requestCameraAndMicPermissions } from '@hiyve/rn-react';

      const granted = await requestCameraAndMicPermissions();
      if (!granted) {
      Alert.alert('Permissions required', 'Camera and microphone access are needed.');
      }