add folder prompt
This commit is contained in:
parent
e06bba66de
commit
eb3d82ac05
1 changed files with 11 additions and 6 deletions
|
@ -45,6 +45,7 @@ public class Downloader extends AppCompatActivity {
|
||||||
S3Object object;
|
S3Object object;
|
||||||
boolean started = false;
|
boolean started = false;
|
||||||
boolean cancel = false;
|
boolean cancel = false;
|
||||||
|
boolean isfolder = false;
|
||||||
boolean style;
|
boolean style;
|
||||||
long filesize = 0;
|
long filesize = 0;
|
||||||
long transfered = 0;
|
long transfered = 0;
|
||||||
|
@ -201,12 +202,16 @@ public class Downloader extends AppCompatActivity {
|
||||||
private void performFileSearch(String messageTitle) {
|
private void performFileSearch(String messageTitle) {
|
||||||
//uri = Uri.parse("content://com.android.externalstorage.documents/document/home");
|
//uri = Uri.parse("content://com.android.externalstorage.documents/document/home");
|
||||||
intent = new Intent();
|
intent = new Intent();
|
||||||
|
if (isfolder) {
|
||||||
|
intent.setAction(Intent.ACTION_OPEN_DOCUMENT_TREE);
|
||||||
|
} else {
|
||||||
intent.setAction(Intent.ACTION_CREATE_DOCUMENT);
|
intent.setAction(Intent.ACTION_CREATE_DOCUMENT);
|
||||||
//intent.addCategory(Intent.CATEGORY_OPENABLE);
|
//intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||||
//intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);
|
//intent.putExtra(Intent.EXTRA_LOCAL_ONLY, true);
|
||||||
//intent.putExtra("android.provider.extra.INITIAL_URI", uri);
|
//intent.putExtra("android.provider.extra.INITIAL_URI", uri);
|
||||||
intent.putExtra(Intent.EXTRA_TITLE, filename);
|
intent.putExtra(Intent.EXTRA_TITLE, filename);
|
||||||
intent.setType("*/*");
|
intent.setType("*/*");
|
||||||
|
}
|
||||||
((Activity) this).startActivityForResult(intent, 50);
|
((Activity) this).startActivityForResult(intent, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue