Transfer data from one device to another via Bluetooth!
• Send documents/text • Fast data transfer (450KB/s) (android 9 --> android 10) • No data loss
Of blocks available and their purpose
Raised when the device is connected to another Bluetooth device
Raised when found list of available devices
names: List of available device's name
addresses: List of available device's addresses
Raised when message/document arrived.
isMessage: If the data received is message or document
data: Message/Document path
length: Length of bytes received
Raised when sending of message/document is in progress
sentBytes: Number of sent bytes
totalBytes: Totall number of bytes
Raised when sent message/document
isMessage: Number of sent bytes
Accept the any incoming connection
Search for all the available Bluetooth devices
raises: Connected event
Connect using the device index
device: Index of device to connect
Start the message/document listener
Send document to the connected device
Send message to the connected device
Set the UUID needed for Bluetooth connection
"8ce255c0-223a-11e0-ac64-0803450c9a66" is the default value
Get the UUID set previously
Set the path where icoming files will be saved
"/storage/emulated/0/BluetoothTransfer/" is the defualt value
Get the folder path set previously
Check out the source
Download extension (.aix)
com.kumaraswamy.bluetooth.aix (26.6 KB)
Have a good day!
Other version (only text transfer)
An extension to transfer text from one Bluetooth device (Phone) to another!
• 1.0 Extension version • 27 / 12 / 2020
android.permission.BLUETOOTH android.permission.BLUETOOTH_ADMIN android.permission.ACCESS_COARSE_LOCATION android.permission.ACCESS_FINE_LOCATION
Get the list of available Bluetooth devices. Asks to turn on Bluetooth if not on.
Returns: List of device names and address
Start the server-side connection (Waits for client connection). Auto pairs device if not paired
Connect using the index from the client-side using from the index of Bluetooth devices.
Start listening to the messages.
Triggers: FoundMessage Event
Send a message to the connected device/phone
Raised when the opposite device sends the message.
Disconnects from the connected device.
Thanks to @Vknow360 for helping me