Send list of file between activities

To send list of file via intent, in sender activity:

   ArrayList<File> fileList = new ArrayList<File>();
...

Intent intent = new Intent(MainActivity.this, secondActivity.class);
intent.putExtra("FILES_TO_SEND", fileList);
startActivity(intent);


In receiver activity:

  ArrayList<File> filelist = 
(ArrayList<File>)getIntent().getSerializableExtra("FILES_TO_SEND");


0 Response to "Send list of file between activities"

Posting Komentar