S slowtime Active Member Licensed User Longtime User Feb 25, 2014 #1 Hi, I test if my bluetooth device is connected with this code: Manifest Code: Copy AddReceiverText(s2, <intent-filter> <action android:name="android.bluetooth.device.action.ACL_DISCONNECTED"/> </intent-filter>) AddPermission(android.permission.BLUETOOTH) s2 (service) Code: Copy 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
Hi, I test if my bluetooth device is connected with this code: Manifest Code: Copy AddReceiverText(s2, <intent-filter> <action android:name="android.bluetooth.device.action.ACL_DISCONNECTED"/> </intent-filter>) AddPermission(android.permission.BLUETOOTH) s2 (service) Code: Copy 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
Erel B4X founder Staff member Licensed User Longtime User Feb 25, 2014 #2 The intent priority will not affect this delay. Are you connecting to the Bluetooth device with the Serial library? Upvote 0
The intent priority will not affect this delay. Are you connecting to the Bluetooth device with the Serial library?
S slowtime Active Member Licensed User Longtime User Feb 25, 2014 #3 Erel said: The intent priority will not affect this delay. Are you connecting to the Bluetooth device with the Serial library? Click to expand... Hi, Yes with serial. I aquire data with your seria bluetooth example app. Upvote 0
Erel said: The intent priority will not affect this delay. Are you connecting to the Bluetooth device with the Serial library? Click to expand... Hi, Yes with serial. I aquire data with your seria bluetooth example app.
Erel B4X founder Staff member Licensed User Longtime User Feb 25, 2014 #4 You should handle AsyncStreams Error and Terminated events. Upvote 0
S slowtime Active Member Licensed User Longtime User Feb 25, 2014 #5 Thank you. I'll try as you suggest. Ciao Upvote 0