Skip to content

Commit 68ce32f

Browse files
committed
chore: update
1 parent 2705d6b commit 68ce32f

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

packages/mlkit-core/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,21 @@ To use all the vision APIs at once, set the `detectionType` property to `'all'`
4747
To access a specific API, Barcode scanning for example, set the `detectionType` property to the API name (`'barcode'` for Barcode scanning), AND import that API's NativeScript plugin.
4848

4949
3. Check if ML Kit is supported
50-
4. Request for permission to access the device camera
50+
To verify if ML Kit is supported on the device, call the `isAvailable()` method on [MLKitView class](#mlkitview-class).
51+
52+
```ts
53+
if(MLKitView.isAvailable()){
54+
55+
}
56+
```
57+
4. Request for permission to access the device camera by calling `requestCameraPermission()`:
58+
59+
```ts
60+
mlKitView.requestCameraPermission().then(()=>{
61+
62+
})
63+
```
64+
The following are example of registering and using `MLKitView` in the different JS flavors.
5165

5266
### Core
5367

0 commit comments

Comments
 (0)