expo camera on android (pixel) not working

Please provide the following:

  1. SDK Version: EXPO 40 (Latest SDK)
  2. Platforms(Android/iOS/web/all): Android

I am creating a simple video recoding app. Here is the code that I am using. When opening the page, EXPO client asks for permission but the app does not ask for permission. I tried expo-permissions and permissions in expo-camera and none of it work. What is odd is that audio is recoding but the video is not. Also, where do I check the file, so I can open it separately so I can play it. I am using tunnel and expo metro bundler.

useEffect(() => {
        (async () => {
            const { status } = await Permissions.askAsync(Permissions.CAMERA, Permissions.AUDIO_RECORDING);
            setHasPermission(status === "granted");
        })();
    }, []);

Also tried this:

useEffect(() => {
        (async () => {
            const { status } = await Camera.requestPermissionsAsync();
            setHasUserPermission(status === 'granted');
        })();
    }, []);

The second one seems to work, does not ask for permissions consistently, but only records audio but NO video.

Did someone face the same issue?

Thanks in advance.

Never mind on the rendering, it was a styling issue. The permissions is not consistent thought.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.