Core

@nativescript/mlkit-core

npm install @nativescript/mlkit-core

Usage

Core

Ensure you’ve included xmlns:ui="@nativescript/mlkit-core" on the Page element

<ui:MLKitView cameraPosition="back" detectionType="all" detection="onDetection" />

Angular

  • TypeScript

  • HTML

import { MLKitModule } from '@nativescript/mlkit-core/angular';

@NgModule({
    imports: [
    MLKitModule
    ],
    declarations: [
        AppComponent
    ],
    bootstrap: [AppComponent]
})
<MLKitView
  cameraPosition="back"
  detectionType="all"
  (detection)="onDetection($event)"
></MLKitView>

Vue

  • TypeScript

  • HTML

import Vue from 'nativescript-vue'
import MLKit from '@nativescript/mlkit-core/vue'

Vue.use(MLKit)
<MLKitView cameraPosition="back" detectionType="all" @detection="onDetection" />