Jumat, 30 Agustus 2013

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 komentar:

Posting Komentar

Copyright © 2012 Codding News All Right Reserved