Android Question Gap in Bluetooth ACL_DISCONNECTED

slowtime

Active Member
Licensed User
Longtime User
Hi,

I test if my bluetooth device is connected with this code:

Manifest

B4X:
AddReceiverText(s2, <intent-filter>
<action android:name="android.bluetooth.device.action.ACL_DISCONNECTED"/>
</intent-filter>)
AddPermission(android.permission.BLUETOOTH)


s2 (service)

B4X:
Sub Service_Create
End Sub

Sub Service_Start (StartingIntent As Intent)
Log("Disconnected")
End Sub

It's run well, but there is a gap (about 10 seconds) between I stop bluetooth device and the service start.
BT device is an external gps antenna paired with the smartphone.

How I can change the priority of intent (if is possible ).
Do you know another way to cancel the gap.

Regards

Ciao
 
Top