• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps connect two devices and send automatically via bluetooth

amirihana

Newbie
i need bluetooth operations to be automatic as much as possible. I used xxxxUsingInsecureRfcommWithServiceRecordto avoid authentification windows. but after pairing them, i used this code but its not working (i want one device to fetch for the other in his paired devices list and establish a connection).

Code:
 for(Iterator<BluetoothDevice> i= mBluetoothAdapter.getBondedDevices().iterator(); i.hasNext();)
             {
                BluetoothDevice bt=(BluetoothDevice)i.next();
                if(bt.getAddress()=="68:48:98:8D:92:BB")
                     mChatService.connect(bt);

after this, i call sendToTarget(), to automatically send a certain String.

Any ideas how to do that?
 
Back
Top Bottom