getting BT name

melamoud

Active Member
Licensed User
Longtime User
Hi,

I'm playing with the BluetoothAdmin class but I cant make it to work,
I do not understand how to get the DeviceFound event to work
I have this line in my Activity_Create where BTAdmin is of the right type
BTAdmin.Initialize("BTAdmin")

I have this defined but it never get called (even when BT is off, than on, and connected
Sub BTAdmin_DeviceFound (Name As String, MacAddress As String)

regardless I need to get the device name even if the app is running after the BT is connected is that possible ?

sorry for the beginner question.

thanks
 

melamoud

Active Member
Licensed User
Longtime User
Configuration / state access

Thanks , I have looked at the tutorial, but what I'm looking for is not to connect to some device but to know what device is connected, just to know the name of it, I want to present the name of the connected device, I wrote such an application using tasker, but I want to build it in basic,

are you saying there is no access to such information ?

is this a permission issue ? or no one wrote the library that does that yet ?

thanks
 
Upvote 0

Mark Hollingworth

Member
Licensed User
Longtime User
You can find the names of paired devices with Serial.GetPairedDevices. You don't have access to BT devices connected by other apps.

Sorry for posting on an old thread but I have been searching the forum for an answer to my question but have not found a suitable answer and this was the first post I saw that came close to what I want to do. So just want to clarify your above comment.

I am trying to find a way for my app to be able to query a device name and address when it starts up if the device is already connected using the stock bluetooth connection (turn on bluetooth through android settings and select the device to connect to). I know I can do this with intents when a device connects, using a service and listening for the CONNECTED intent but if I stop the service then start it again the CONNECTED intent is not fired if the bluetooth device is already connected.

So I guess my question is can you get the details of a bluetooth device that is already connected when my app starts up?
 
Upvote 0
Top