-
Notifications
You must be signed in to change notification settings - Fork 33
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 #59
Comments
See there kivy-garden/xcamera#14 |
+1 |
after studing documentation i was able to close the camera by following ` MDFlatButton: ` |
Hi guys, either |
I too have gone deep down the rabbit hole on this one! Everything I do to restart after releasing the camera results in these warnings followed by pages of errors Here is some sample code where I have a main screen with a scanner button to take me to scanner screen with a back button. The scanner works fine and my two lines of teardown do turn off the camera when called but clicking the scanner button again does not work no matter what I try to destroy - see later lines in teardown. Any ideas?
|
I had same issue in all aspects when developing a desktop application. I resolved this doing in 4 steps (i do not know if all 2nd is necessary), assuming that your app has a instantiated 1. Release device print("Releasing device")
self._zbarcam.ids.xcamera._camera._device.release() 2. Stop ZBarCam print("Stopping <ZBarCam>")
self._zbarcam.stop() 3. Unload zbarcam.kv file mod_path = os.path.dirname(sys.modules['kivy_garden.zbarcam'].__file__)
zbar_kv_path = os.path.join(mod_path, 'zbarcam.kv')
print("Unloading '%s'" % zbar_kv_path)
Builder.unload_file(zbar_kv_path) 4. Unload xcamera.kv file mod_path = os.path.dirname(sys.modules['kivy_garden.xcamera'].__file__)
xcam_kv_path = os.path.join(mod_path, 'xcamera.kv')
print("Unloading '%s'" % xcam_kv_path)
Builder.unload_file(xcam_kv_path) The complete example can be found here |
Is there any option to close camera after i finish scan of qr code?
The text was updated successfully, but these errors were encountered: