Hi everycoders ;-),
I try to realize an application for android (iOS in future surely) but have little difficulties.
The idea is to discover phone in my family (using BLEManager library because using GPS is too bad on my test [few meters errors...]) which all have the program installed on. For do that I know I need to make them always discoverable :
and use that for found device
All is OK at this point but I need to limit (or calcul) distance between my phone and bluetooth search, so do you find it's possible and, if yes, how could I do that ? Or maybe I could estimate distance with bluetooth data but I don't know how ?
Thanks all for helping
I try to realize an application for android (iOS in future surely) but have little difficulties.
The idea is to discover phone in my family (using BLEManager library because using GPS is too bad on my test [few meters errors...]) which all have the program installed on. For do that I know I need to make them always discoverable :
B4X:
Intent1.Initialize("BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE", "")
Intent1.PutExtra("BluetoothAdapter.EXTRA_DISCOVERABLE_DURATION",600)
StartActivity(Intent1)
and use that for found device
B4X:
Sub BLuE1_DeviceFound (Name As String, Id As String, AdvertisingData As Map, RSSI As Double)
Log("Name= " & Name & ", ID= " & Id & ", RSSI= " & RSSI & ", AD= " & AdvertisingData)
End Sub
All is OK at this point but I need to limit (or calcul) distance between my phone and bluetooth search, so do you find it's possible and, if yes, how could I do that ? Or maybe I could estimate distance with bluetooth data but I don't know how ?
Thanks all for helping