Zum Hauptinhalt springen
Zurück zu plugins
@capgo/capacitor-Näherung
Anleitung
@capgo/capacitor-Näherung

Näherung

Aktivieren Sie die native Näherungserkennung, damit Ihre App reagiert, wenn das Gerät in der Nähe eines Gesichts, einer Hand oder einer Oberfläche ist

Anleitung

Tutorial zur Nähe

Auf Gerät testen

Laden Sie die Capgo-App herunter, dann scannen Sie die QR-code.

Proximity-Plugin-Vorschau-QR code

Mit @capgo/capacitor-proximity

Capacitor-Plugin für die Aktivierung der Näherungsmessung in mobilen Apps.

Installieren

bun add @capgo/capacitor-proximity
bunx cap sync

Was dieses Plugin bereitstellt

  • enable - Näherungsmessung aktivieren.
  • disable - Näherungsmessung deaktivieren.
  • getStatus - Aktuelle Sensorverfügbarkeit und Plugin-Status abrufen.

Beispiel-Verwendung

enable

Näherungsmessung aktivieren.

import { CapacitorProximity } from '@capgo/capacitor-proximity';

await CapacitorProximity.enable();

disable

Näherungsmessung deaktivieren.

import { CapacitorProximity } from '@capgo/capacitor-proximity';

await CapacitorProximity.disable();

getStatus

Aktuelle Sensorverfügbarkeit und Plugin-Status abrufen.

import { CapacitorProximity } from '@capgo/capacitor-proximity';

const status = await CapacitorProximity.getStatus();

Vollständige Referenz

Fortsetzen Sie mit der Verwendung von @capgo/capacitor-proximity

Wenn Sie die Verwendung von Die Verwendung von @capgo/capacitor-proximity um native Plugin-Arbeit zu planen, verbinden Sie es mit @capgo/capacitor-proximity zur Implementierungsdetail in @capgo/capacitor-proximity Anleitung zum Starten zur Implementierungsdetail in Anleitung zum Starten Capgo Plugin-Verzeichnis zur Produktionsablauf in Capgo Plugin-Verzeichnis Capacitor Plugins von Capgo zur Implementierungsdetail in Capacitor Plugins von Capgo, und Plugins hinzufügen oder aktualisieren zur Implementierungsdetail in Plugins hinzufügen oder aktualisieren.