I am working on an Android application that will transfer multiple image files to another mobile device via a Bluetooth connection.
I used the following transfer method in android:
ArrayList<Uri> uris=new ArrayList<Uri>(); String multifile[]={"/sdcard/aaa.txt","/sdcard/bbb.txt","/sdcard/ccc.txt"}; int len=multifile.length; Intent Int=new Intent(); Int.setAction(android.content.Intent.ACTION_SEND_MULTIPLE); Int.setType("*/*"); for(int i=0;i<len;i++) { File file=new File(multifile[i]); uris.add(Uri.fromFile(file)); } Int.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris); startActivity(Int);
This method has successfully transferred files. But I only have nine images on an Android phone, and then my application will go to another set of 9 images that need to be transferred, because I have to call the above selection wizard to send files. But I do not want the user to select an option from chooser again again.
Is there a way to send files through this option (bluetooth from wizard) silently (without user intervention)?
source share