0

Is it possible send file from Android application private directory via Bluetooth? (directory /data/data//.. (getFilesDir()))
i can't anywhere find and answer to this.

This and Intent.ACTION_SEND approach works fine with external files:
Sending a File using Bluetooth OBEX Object Push Profile (OPP)

However, when i try to send private file I get "Unknown file not sent"
WCat shows "BtOpp Service "Can't open file for OUTBOUND info 57"", when BtOpp throws FileNotFoundException

Thanks

Community
  • 1
  • 1
lietus
  • 199
  • 2
  • 11

1 Answers1

0
String path = con.getFilesDir().getAbsolutePath() + File.separator  + TEMP_FILE_NAME; //i will get file from your /data/data/...
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("plain/text");// 
i.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:/" + path));
startActivity(Intent.createChooser(i, "Send File"));

hit accept if working.... Thanks

Rudolf Polzer
  • 345
  • 4
  • 9
Sandeep
  • 2,573
  • 3
  • 21
  • 28
  • DeepSan, please stop asking folks to accept your answers. It's just noise, and comes across as overly needy. They'll accept it if they want to. – Michael Petrotta Jul 29 '12 at 19:14