1

I have searched much but I didn't find any solution but I god somewhere this example:

ContentValues values = new ContentValues(); 
values.put(BluetoothShare.URI, "content://" + uritoSend);
values.put(BluetoothShare.DESTINATION, deviceAddress);
values.put(BluetoothShare.DIRECTION, BluetoothShare.DIRECTION_OUTBOUND);    
Long ts = System.currentTimeMillis();  
values.put(BluetoothShare.TIMESTAMP, ts);  

but this example give error unsupported content. please provide me the correct answer.

Thanks in advance

faizanjehangir
  • 2,771
  • 6
  • 45
  • 83
Karna
  • 19
  • 1
  • Think this will help you.. http://stackoverflow.com/questions/6227498/how-to-send-file-from-android-device-to-other-device-through-bluetooth-by-code – Marcos Placona Oct 09 '12 at 07:57

1 Answers1

0
Intent intent = new Intent();  
intent.setAction(Intent.ACTION_SEND);  
intent.setType("image/*");


String uri = "/mnt/sdcard/test.jpg";
intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File(uri)));
startActivity(intent);
darsh
  • 741
  • 4
  • 10
  • 34
haresh
  • 11
  • 3