B4i Library BLE (Bluetooth Low Energy) library

D

Deleted member 103

Guest
If my app goes in background remains my BLE device also connected, but the app does not get any more data, is that normal?
Only when the app comes back to foreground, receives back the data.
 
D

Deleted member 103

Guest
I have been studying last night this side.
If I understood it correctly should be possible to receive and send its data from BLE devices in backgroud, but I do not understand how?
 
D

Deleted member 103

Guest
As I said, if the app is in the backgound connection remains, but data is not received and not sent.

Could this code help?
B4X:
Private Sub Application_Background
    bluetooth.btManager.SetNotify(bluetooth.ConnectedServices.Get(0), "FFE1", True)
End Sub
 
Last edited by a moderator:

Erel

B4X founder
Staff member
Licensed User
Longtime User
D

Deleted member 103

Guest
Thank Erel, I'll try it tonight.
Unfortunately it does not work.
What else can I do?
For my app is very important, it should in backgound receive the data so that the distance traveled is detected, as with GPS.
 
D

Deleted member 103

Guest
Thank you anyway.
You do not guilt if it does not work, only Apple is guilty with his OS!
 

Fabio Campanella

Member
Licensed User
Longtime User
Hi,
Bluetooth Scan Works in BackgroundMode if you Specify UUID devices that you must scan:

I have Estimote Beacon and I try this

B4X:
   Dim oUUID As List
   oUUID.Initialize
   oUUID.Add("FE9A")
   manager.Scan2(oUUID, True)

FE9A Value is UUID device for estimote beacons. In background mode OS call Manager_DeviceFound Correctly

 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…