bluetooth-simple-android-plugin
TypeScript icon, indicating that this package has built-in type declarations

0.0.19 • Public • Published

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.

Param Type Description
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.

Param Type Description
callback (message: MyData | null, err?: any) => void Funció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


Readme

Keywords

Package Sidebar

Install

npm i bluetooth-simple-android-plugin

Weekly Downloads

3

Version

0.0.19

License

MIT

Unpacked Size

30.1 kB

Total Files

27

Last publish

Collaborators

  • rubyrobapplications