0

是否可以通过蓝牙从 Android 应用程序私有目录发送文件?(目录/data/data//..(getFilesDir()))
我无法在任何地方找到并回答这个问题。

这种 Intent.ACTION_SEND 方法适用于外部文件:
Sending a File using Bluetooth OBEX Object Push Profile (OPP)

但是,当我尝试发送私人文件
时,当 BtOpp 抛出 FileNotFoundException

谢谢

4

1 回答 1

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"));

如果工作,请点击接受....谢谢

于 2012-04-27T09:39:42.910 回答