Sending a File using Bluetooth OBEX Object Push Profile (OPP)
I’ve written a sample application to test the answer provided. Unfortunately it doesn’t work for me, so I think this question is not completely answered.
I’ve written a sample application to test the answer provided. Unfortunately it doesn’t work for me, so I think this question is not completely answered.
Try this. I can send a file using this code. ContentValues values = new ContentValues(); values.put(BluetoothShare.URI, “file:///sdcard/refresh.txt”); values.put(BluetoothShare.DESTINATION, deviceAddress); values.put(BluetoothShare.DIRECTION, BluetoothShare.DIRECTION_OUTBOUND); Long ts = System.currentTimeMillis(); values.put(BluetoothShare.TIMESTAMP, ts); getContentResolver().insert(BluetoothShare.CONTENT_URI, values); Code of BluetoothShare.java import android.provider.BaseColumns; import android.net.Uri; /** * Exposes constants used to interact with the Bluetooth Share manager’s content * provider. */ public final class … Read more