eclipse - How to implement fix Bluetooth Device in Android -


i want write bluetooth app without discovery/scanning. want hardcode server device, client needs connect in code.

if use constructor:

public connectthread(bluetoothdevice device) {

how have implement device? variable of mac address?

if try this:

device = new bluetoothdevice("xx:xx:xx:xx:xx:xx");

eclipse says: "constructor not visible"

you can use bluetoothadapter.getremotedevice(string) create bluetoothdevice representing device of known bluetooth device address.

bluetoothadapter myadapter = getdefaultapater(); bluetoothdevice mydevice;  mydevice = myadapter.getremotedevice("xx:xx:xx:xx:xx:xx"); 

Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -