Android Question BLE device not found

saunwin

Active Member
Licensed User
Longtime User
Morning,

On a BLE tablet, In a continuous scan for nearby BLE devices the (service) code below returns several surrounding ble devices but not my phone (sony z5 compact). In the tablets bluetooth settings the tablet discovers my phone.
Any ideas.

Thanks in advance.


B4X:
Sub Manager_DeviceFound (Name As String, Id As String, AdvertisingData As Map, RSSI As Double)
    Log("Found: " & Name & ", " & Id & ", RSSI = " & RSSI & ", " & AdvertisingData) 'ignore
    End If
       
End Sub

Public Sub StartScan
    If manager.State <> manager.STATE_POWERED_ON Then
        Log("Not powered on.")
    Else If rp.Check(rp.PERMISSION_ACCESS_COARSE_LOCATION) = False Then
        Log("No location permission.")
    Else
        manager.Scan2(Null, True)
    End If
End Sub
 

JohnC

Expert
Licensed User
Longtime User
The "LE" is BLE means "Low Energy".

BLE devices are typically devices that run on a battery for many days, so they don't do a lot of intense computational or wireless communications (like phones/Bluetooth headsets do) because that would eat up the battery life too quickly.

For example, the electronic tags that you can put on your keys that you can use to find your lost keys based on the location your phone last communicated with the tag.
 
Last edited:
Upvote 0
Top