Android provides global vars for the actual download directories
This commit is contained in:
parent
984dd1cc25
commit
b3a1a5dcc2
|
@ -61,17 +61,17 @@ public class DownloadDialog extends DialogFragment {
|
||||||
String suffix = "";
|
String suffix = "";
|
||||||
String title = arguments.getString(TITLE);
|
String title = arguments.getString(TITLE);
|
||||||
String url = "";
|
String url = "";
|
||||||
String downloadFolder = "Download";
|
String downloadFolder = Environment.DIRECTORY_DOWNLOADS;
|
||||||
switch(which) {
|
switch(which) {
|
||||||
case 0: // Video
|
case 0: // Video
|
||||||
suffix = arguments.getString(FILE_SUFFIX_VIDEO);
|
suffix = arguments.getString(FILE_SUFFIX_VIDEO);
|
||||||
url = arguments.getString(VIDEO_URL);
|
url = arguments.getString(VIDEO_URL);
|
||||||
downloadFolder = "Movies";
|
downloadFolder = Environment.DIRECTORY_MOVIES;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
suffix = arguments.getString(FILE_SUFFIX_AUDIO);
|
suffix = arguments.getString(FILE_SUFFIX_AUDIO);
|
||||||
url = arguments.getString(AUDIO_URL);
|
url = arguments.getString(AUDIO_URL);
|
||||||
downloadFolder = "Music";
|
downloadFolder = Environment.DIRECTORY_MUSIC;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Log.d(TAG, "lolz");
|
Log.d(TAG, "lolz");
|
||||||
|
|
Loading…
Reference in New Issue