java - How to retrieve Bluetooth Address through Name from Paired/bonded device list? -



java - How to retrieve Bluetooth Address through Name from Paired/bonded device list? -

i when i'm discovering devices:

intentfilter filter = new intentfilter(bluetoothdevice.action_found); this.registerreceiver(mdiscovery, filter);

and in in broadcastreceiver:

string action = intent.getaction(); if (bluetoothdevice.action_found.equals(action)) { bluetoothdevice device = intent.getparcelableextra(bluetoothdevice.extra_device); if (device.getbondstate() != bluetoothdevice.bond_bonded) {

and can device.getname() , device.getaddress().

my problem is, know how intent discovery. so, android devices fair know have list paired devices names respective addresses.

given name, how can straight (without discovery , without broadcast receiver) address?

after created object of bluetoothadapter ( let's mbluetoothadatper) can list of bonded(paired) devices mbluetoothadapter.getbondeddevices(). more info on link.

java android bluetooth

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -