Skip to content

Camera capture image not working on Bluestack : black screen + weird sound on capture picture click #650

@anasbn3issa

Description

@anasbn3issa

Describe the bug
Capture image is working fine on all android studio immulators as well as mobile phones using apk or in local, but when testing using Bluestack immulator:

  • when opening the camera, it gives a black screen
  • when clicking on capture image
    To Reproduce
    Steps to reproduce the behavior:
  1. import {CameraScreen} from 'react-native-camera-kit';
  2. created a customcamera component
const CustomCamera = ({isFocused, onActionButtonPressed, t}) => {
    if (!isFocused) return null;

  return (
    <View style={{flex: 1, position: 'relative'}}>
      <CameraScreen
        actions={{rightButtonText: t("Valider"), leftButtonText : t("Annuler")}}
        onBottomButtonPressed={onActionButtonPressed}
        flashImages={{
          on: flashOnImg,
          off: flashOffImg,
          auto: flashAutoImg,
        }}
        cameraFlipImage={cameraFlipIconImg}
        captureButtonImage={cameraButtonImg}
        showCapturedImageCount={true}
      />
    </View>
  );
};
  1. and this is how I'm using the component
{ Max 4 Photos }

Expected behavior

  • opening the camera, seeing what would the camera show and eventually capture images

Screenshots
image

Desktop:

  • OS: Windows
  • Version 11

Immulator:

  • Device: BlueStack X
  • Version 19.0.0.0

Additional context
It's important to note that I have made changes to the actual npm package react-native-camera-kit, but none of the changes would affect the camera as it did. especially because it works on all evironments except for Blue Stacks'
here's the full repo : https://github.com/anasbn3issa/react-native-camera-kit
I simply added namespace in android/build.gradle and bumped its sdk version.
also :
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions