1.Introduction
BT extension provides some features to work with bluetooth.
Latest Version: 1.2
Released: 2020-08-28T18:30:00Z
Last Updated: 2021-03-18T18:30:00Z
Required Api: 17
Permissions: android.permission.BLUETOOTH,android.permission.BLUETOOTH_ADMIN,android.permission.ACCESS_FINE_LOCATION,android.permission.ACCESS_COARSE_LOCATION
2.Blocks
3.Documentation
- After Set Duration
Event indicating whether duration was set successfuly or not.
success ~ boolean
seconds ~ int
- On Discovery Finished
Event indicating that discovery has been finished and returns addresses paired and new devices.
pairedDevices ~ List
newDevices ~ List
- OnDiscoveryStarted
Event indicating that discovery has been started.
- On Error
Even indicating that a error has been occurred and returns error message.
errorMessage ~ text
- On Pairing State Changed
Event indicating that a device's state has changed.Either it has paired or unpaired with this device.
address ~ text
isPaired ~ boolean
- On State Change
Event indicating that device's bluetooth state has changed.
state ~ int
Possible values: BluetoothAdapter | Android Developers
- Address
Returns device's bluetooth address.
Returns : text
- Cancel Discovery
Tries to stop discovery for nearby devices.
- Get Name
Returns bt device name from address.
Returns : text
- Get Paired Devices
Returns a list of paired devices.
Returns : list
- Get Scan Mode
Returns bluetooth scan mode.
Returns : int
Possible Values: BluetoothAdapter | Android Developers
- Is Discovering
Returns true if device is searching for nearby bluetooth devices.
Returns : boolean
- Is Enabled
Returns true if bluetooth is enabled.
Returns : boolean
- Is Paired Device
Returns true if given address points to a paired device.
Returns : boolean
- Is Valid Address
Returns true if given address is valid.
Returns : boolean
- Name
Returns device's bluetooth name.
Returns : text
- Pair
Tries to pair with given device.
- Rename
Tries to rename the device's bt name and returns result.
Returns : boolean
- Set Visibility
Sets visibility of device in seconds.
- Start Discovery
Tries to start discovery for nearby devices.
- Toggle
Enables/Disables bluetooth.
- Unpair
Tries to unpair with given device.
4.Downloads
5.Credits
Thanks to @Salman_Dev for beta testing the extension
Thanks a lot to MIT
Thank you.