i am trying ti send file from android to another device by using the following code
socket = device.createRfcommSocketToServiceRecord(uuid);
socket.connect();
OutputStream os = socket.getOutputStream();
File f = new File(strPath);
byte [] buffer = new byte[(int)f.length()];
FileInputStream fis = new FileInputStream(f);
BufferedInputStream bis = new BufferedInputStream(fis);
bis.read(buffer,0,buffer.length);
os.write(buffer,0,buffer.length);
os.flush();
os.close();
socket.close();
I added BLUETOOTH and BLUETOOTH_ADMIN to user permissions in AndroidManifest.xml
But file is not transferring, connection is establishing b/w devices