0.0.19 • Published 3 years ago

bluetooth-simple-android-plugin v0.0.19

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

bluetooth-simple-android-plugin

Capacitorjs plugin to use the bluetooth adapter of an android device. simply and direct / Plugin de Capacitorjs para usar el adaptador bluetooth de un dispositivo Android. simple y directo

Install

npm install bluetooth-simple-android-plugin
npx cap sync

Para utilizar este plugin se necesita activar los siguientes permisos en el archivo manifest / To use this plugin you need to activate the following permissions in the manifest

    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

API

Simplemente importe la clase. Luego puede utilizar sus metodos estáricos directamente. Simply import the class. Afther, you can use its static methods directly.

    import { BluetoothSimple } from 'bluetooth-simple-android-plugin';

setName(...)

setName(options: { name: string; }) => any

Cambia el nombre del dispositivo. Change the name of device.

ParamTypeDescription
options{ name: string; }Nombre que queires cambiar. Name that you want to change.

Returns: any


startDiscovery(...)

startDiscovery(callback: MyPluginCallback) => void

Activa la detección de los dispositivos visibles. Cada vez que se detecta un nuevo dispositivo se lanza la funcion callback pasada por parámetros. Activate the detection of visible devices. For each new device is detected, is throw the callback function passed by params.

ParamTypeDescription
callback(message: MyData | null, err?: any) => voidFunción que se ejecutará segun se vayan descubriendo los dispositivos.

setDiscoverable()

setDiscoverable() => any

Activa el estado de ser detectado del dispositivo. Activate the state of to be detected of device.

Returns: any


0.0.19

3 years ago

0.0.18

3 years ago

0.0.17

3 years ago

0.0.16

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago

0.0.13

3 years ago

0.0.12

3 years ago

0.0.11

3 years ago

0.0.1

3 years ago