Android Question Bluetooth signal strength?

techknight

Well-Known Member
Licensed User
Longtime User
Is there a way to retrieve the signal strength/meter of a bluetooth device? Or an active connection? Like Wi-Fi?

that would be awesome.
 

techknight

Well-Known Member
Licensed User
Longtime User
Ok, great! However is there anyway to monitor this on the active connection, to let me know I am getting too far away, etc.. While connected? That would be awesome.

Also, What is the math of taking the RSSI value and converting it into a bargraph/progressbar?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
However is there anyway to monitor this on the active connection, to let me know I am getting too far away, etc.. While connected?
The only way is to search for devices. Note that AStream_Error or Terminated events will be raised when the connection breaks.

Also, What is the math of taking the RSSI value and converting it into a bargraph/progressbar?
Not sure that I understand. Maybe this will be helpful: http://www.speedguide.net/faq/how-does-rssi-dbm-relate-to-signal-quality-percent-439
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
Basically I want to show the RSSI value as a level bar, The lower the level the worse the signal is. Of course. So I need to figure out the math for RSSI to level bar.

Anyways, Does this RSSI code report the MAC address of the adapter in question? Otherwise how do I match up an RSSI value to a particular device?

I brought up an older thread you pointed me to, but all I got was a response of it being an old thread. Was trying to avoid double-posting, when there was already a relevant thread.

thanks.
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
I figured it out. Used StartingIntent instead of Intent

But I noticed the Service will fire whether the app is open or not, so if I am using a different program to discover bluetooth, my service fires. anyway to only allow the service to fire when App is open only?
 
Upvote 0
Top