Skip to content

Commit 67153c7

Browse files
committed
add documentation to the snippet
1 parent 73b4c15 commit 67153c7

File tree

1 file changed

+14
-0
lines changed
  • data-capture-ready-to-use-ui-example/app/src/main/java/io/scanbot/example/doc_code_snippet/detailed_setup_guide

1 file changed

+14
-0
lines changed

data-capture-ready-to-use-ui-example/app/src/main/java/io/scanbot/example/doc_code_snippet/detailed_setup_guide/MockCameraSnippet.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,20 @@ import io.scanbot.sdk.camera.ScanbotCameraViewConfigurationProvider
66

77
class MockCameraSnippet {
88
// @Tag("Mock Camera Initialization")
9+
/*
10+
* Initializes the Camera with a mock camera configuration.
11+
* This is useful for testing purposes without requiring a physical camera.
12+
*
13+
* The mock camera will display a static image as the camera feed.
14+
* Make sure to replace the image path with a valid one in your project.
15+
*
16+
* `MockCameraResourceProvider` - delegate that used for feeding camera with fake frames.
17+
* `getFrameImagePath()` - should return path to the absolute path to the `File` in format without `file://` schema
18+
* `getCapturedImagePath()` - should return path to the absolute path to the `File` in format without `file://` schema
19+
* `showDebugImage` - if true, the mock camera will show `getFrameImagePath` file as image preview.
20+
* `tryHideFinderView` - if true, the finder view will be hidden.
21+
* `tryHidePolygonView` - if true, the ar overlay polygon view will be hidden.
22+
*/
923
fun initMockCamera() {
1024
ScanbotCameraViewConfigurationProvider.cameraViewType =
1125
CameraViewType.Mock(

0 commit comments

Comments
 (0)