Sending multiple files via Bluetooth
I am using below code to send a file using blue tooth from one device to another. I want to send multiple files at the same time. Can anyone explain to me how to parse multiple URIs for a file. I've tried doing this with a string tokenizer and a while, but in this case, the default blue tooth request goes twice by default. if there are two parsing files).
StringTokenizer tokens = new StringTokenizer(music, ",");
String stored = "";
while (tokens.hasMoreTokens()) {
stored = tokens.nextToken();
File file = new File(stored);
Log.d("file===", stored);
intentfile = new Intent();
intentfile.setAction(android.content.Intent.ACTION_SEND);
intentfile.setType("video/*");
intentfile.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));
startActivityForResult(intentfile, SEND_REQUEST);
}
+3
source to share