I saw your answer about sending file through Bluetooth. (answered Jun 13 '11 at 5:01)
Intent i = new Intent(Intent.ACTION_SEND); i.setType("image/jpeg");
i.putExtra(Intent.EXTRA_STREAM, Uri.parse("/sdcard/file.jpg"));
startActivity(Intent.createChooser(i, "Send Image"));
Yes! It works. It will open a default Bluetooth tool/window/dialog to send a file. But would you please teach me how to send more files? Here is my code...
String xFile[3] = { "aa.txt", "bb.txt", "cc.txt" };
Intent i = new Intent(Intent.ACTION_SEND); i.setType("text/plain");
for (int i = 0; i < 3; i ++) {
intent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File(xFile[i])));
startActivity(intent);
}
It works, but it will open the default Bluetooth tool/window/dialog for 3 times! @@ If there are 10 files, it will open the default Bluetooth tool/window/dialog 10 times!!
May I know how to open the default Bluetooth tool/window/dialog once, then send all files?
Thank you very much in advance!