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
Post a Comment