ridvanaltun / react-native-deepar

Snapchat-like filters, AR lenses, and real-time facial animations.

Home Page:https://deepar.ai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Whenever I run example app or integrate Colored Vertical Strips on Shown On the screen

simonpojok opened this issue · comments

Description:
Currently am trying to experiment with this SDK, I created a sample app using expo and when I run the app I get, please not that this also happens with the demo app shared under this package

import StackScreenContainer from "@components/containers/stack_screen/StackScreenContainer";
import React, { useEffect, useRef } from "react";
import DeepAR, {
  Camera,
  CameraPositions,
  IDeepARHandle,
} from "react-native-deepar";

const ANDROID_KEY =
  "51f773adc6dc26478e45344c5949fbadf58ef3fa91627e339d148607ddffa6f166e16b5e003c124c";

export default function DeepARCameraScreen() {
  const deepARRef = useRef<IDeepARHandle>(null);

  useEffect(() => {
    (async () => {
      const cameraPermission = await Camera.getCameraPermissionStatus();
      const microphonePermission = await Camera.getMicrophonePermissionStatus();
      console.log("Permissions", cameraPermission, microphonePermission);
    })();
  }, []);

  return (
    <StackScreenContainer>
      <DeepAR
        position={CameraPositions.BACK}
        ref={deepARRef}
        apiKey={ANDROID_KEY}
        style={{ flex: 1 }}
        onInitialized={() => {
          console.log("initializations");
        }}
        onError={(message, code) => {
          console.log("Error Message", message);
        }}
      />
    </StackScreenContainer>
  );
}

Screenshot_2023-04-04-10-21-02-108_com pkbnd app dev

I don't know why this issue happened but can you try latest version (0.11.0) of the library? There is some major changes in the latest version, i hope this issue resolves. @simonpojok

Hey @ridvanaltun @simonpojok Facing the same issue. Did you found any solution?

Same issue.

For me changing to another android device worked as a temporary solution.