You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 14, 2023. It is now read-only.
*[Behavior: Android armeabi-v7a build installed on an arm64-v8a device](#behavior-android-armeabi-v7a-build-installed-on-an-arm64-v8a-device)
81
+
*[Behavior: Android "No supported surface combination"](#behavior-android--no-supported-surface-combination-)
82
82
83
83
## Overview
84
84
@@ -244,7 +244,11 @@ Object classification. Illustrates using a large Tensorflow Lite model, and writ
244
244
245
245
## Preview Widget
246
246
247
-
An app can have multiple `Preview` widgets, but only one can be connected to the physical camera unit at a time. A natural way to implement this is to add a preview widget to a screen's contents, then connect to the camera unit `on_enter` and disconnect `on_pre_leave`. Or if using a ModalView, Popup, or MDDialog use `on_open` and `on_pre_dismiss`. The C4K-Photo-Example illustrates this, the other examples simply connect the camera after `on_start()` and disconnect `on_stop()`.
247
+
An app can have multiple `Preview` widgets instantiated, but only one can be connected to the physical camera unit at a time. A natural way to implement this is to add a Preview widget to a screen's contents, then connect to the camera unit `on_enter` and disconnect `on_pre_leave`. Or if using a ModalView, Popup, or MDDialog use `on_open` and `on_pre_dismiss`. The C4K-Photo-Example illustrates the screen case.
248
+
249
+
The other examples simply connect the camera **after**`on_start()` and disconnect `on_stop()`. The **after**`on_start` is required on Android; both for reliable camera function, and so that the camera is only connected after CAMERA permission has been granted.
250
+
251
+
There is one special case. For the **first** screen, Kivy calls `on_enter` before `on_start`. This violates the requirements described in the previous paragraph. For the **first screen only**, connect the camera after `on_start` and after CAMERA permission has been granted, and not from `on_enter`.
*[Behavior: Android armeabi-v7a build installed on an arm64-v8a device](https://github.com/Android-for-Python/Camera4Kivy#behavior--android-armeabi-v7a-build-installed-on-an-arm64-v8a-device)
81
-
*[Behavior: Android "No supported surface combination"](https://github.com/Android-for-Python/Camera4Kivy#behavior--android--no-supported-surface-combination-)
*[Behavior: Android armeabi-v7a build installed on an arm64-v8a device](https://github.com/Android-for-Python/Camera4Kivy#behavior-android-armeabi-v7a-build-installed-on-an-arm64-v8a-device)
81
+
*[Behavior: Android "No supported surface combination"](https://github.com/Android-for-Python/Camera4Kivy#behavior-android--no-supported-surface-combination-)
0 commit comments