-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Close camera programatically #207
Comments
Hello @feardarkness, Thank you for reaching out! Just to keep you informed, that we do not have exact solution in React-Native to close the camera programmatically, but you can customize our Java wrapper since it is an open-source. I suggest that you fork the repository and make the change in the following file: In line 76, you can add a handler which, after 10 seconds, closes the scanning activity: (new Handler(Looper.getMainLooper())).postDelayed(new Runnable() { Let us know if you find this helpful. |
Hi @somyaguptagit, thank you for the answer. I will test it tomorrow, but, what can I do on IOS? |
Hello @feardarkness, We will look into how can we implement it on iOS from our end and reach out once we we have gathered more information. |
Allow me to jump in. You can, for instance, add an NSTimer in the MBBlinkIDModule.m in the path: Below line 99, you can add:
This will close the scanning controller in 10 seconds. |
I'm using blinkid-react-native 5.17.0 and I couldn't find a way to close the camera programatically. Is there any way to do it?
I would like to call something like
BlinkIDReactNative.BlinkID.closeCamera()
The text was updated successfully, but these errors were encountered: