Java Code Examples for com.ipaulpro.afilechooser.utils.FileUtils#createGetContentIntent()

The following examples show how to use com.ipaulpro.afilechooser.utils.FileUtils#createGetContentIntent() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SimpleUploadUseEndUserActivity.java    From qiniu-lab-android with MIT License 5 votes vote down vote up
public void selectUploadFile(View view) {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(target,
            this.getString(R.string.choose_file));
    try {
        this.startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException ex) {
    }
}
 
Example 2
Source File: ManagePatchesActivity.java    From MCPELauncher with Apache License 2.0 5 votes vote down vote up
public void importPatch() {
	Intent target = FileUtils.createGetContentIntent();
	target.setType("application/x-ptpatch");
	target.setClass(this, FileChooserActivity.class);
	target.putExtra(FileUtils.EXTRA_SORT_METHOD, FileUtils.SORT_LAST_MODIFIED);
	startActivityForResult(target, REQUEST_IMPORT_PATCH);
}
 
Example 3
Source File: TexturePacksActivity.java    From MCPELauncher with Apache License 2.0 5 votes vote down vote up
public void onClick(View v) {
	if (v == addButton) {
		Intent target = FileUtils.createGetContentIntent();
		target.setType("application/zip");
		target.putExtra(FileUtils.EXTRA_MIME_TYPES, new String[] {
			"application/zip", "application/x-appx", "application/vnd.android.package-archive"});
		target.setClass(this, FileChooserActivity.class);
		startActivityForResult(target, REQUEST_ADD_TEXTURE);
	}
}
 
Example 4
Source File: LauncherActivity.java    From Boardwalk with Apache License 2.0 5 votes vote down vote up
private void doBrowseForResourcePack() {
	Intent target = FileUtils.createGetContentIntent();
	target.setType("application/zip");
	target.setClass(LauncherActivity.this, FileChooserActivity.class);

	startActivityForResult(target, REQUEST_BROWSE_FOR_RESOURCE_PACK);
}
 
Example 5
Source File: QuickStartVideoExampleActivity.java    From qiniu-lab-android with MIT License 5 votes vote down vote up
public void selectUploadFile(View view) {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(target,
            this.getString(R.string.choose_file));
    try {
        this.startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException ex) {
    }
}
 
Example 6
Source File: QuickStartImageExampleActivity.java    From qiniu-lab-android with MIT License 5 votes vote down vote up
public void selectUploadFile(View view) {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(target,
            this.getString(R.string.choose_file));
    try {
        this.startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException ex) {
    }
}
 
Example 7
Source File: SimpleUploadWithMimeTypeActivity.java    From qiniu-lab-android with MIT License 5 votes vote down vote up
public void selectUploadFile(View view) {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(target,
            this.getString(R.string.choose_file));
    try {
        this.startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException ex) {
    }
}
 
Example 8
Source File: CallbackUploadWithKeyInJsonFormatActivity.java    From qiniu-lab-android with MIT License 5 votes vote down vote up
public void selectUploadFile(View view) {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(target,
            this.getString(R.string.choose_file));
    try {
        this.startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException ex) {
    }
}
 
Example 9
Source File: FileChooser.java    From filechooser with MIT License 5 votes vote down vote up
private void showFileChooser() {
    // Use the GET_CONTENT intent from the utility class
    Intent target = FileUtils.createGetContentIntent();
    // Create the chooser Intent
    Intent intent = Intent.createChooser(
            target, this.cordova.getActivity().getString(R.string.chooser_title));
    try {
        this.cordova.startActivityForResult((CordovaPlugin) this, intent, REQUEST_CODE);
    } catch (ActivityNotFoundException e) {
        // The reason for the existence of aFileChooser
    }
}
 
Example 10
Source File: SimpleUploadUseFsizeLimitActivity.java    From qiniu-lab-android with MIT License 5 votes vote down vote up
public void selectUploadFile(View view) {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(target,
            this.getString(R.string.choose_file));
    try {
        this.startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException ex) {
    }
}
 
Example 11
Source File: SimpleUploadUseSaveKeyActivity.java    From qiniu-lab-android with MIT License 5 votes vote down vote up
public void selectUploadFile(View view) {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(target,
            this.getString(R.string.choose_file));
    try {
        this.startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException ex) {
    }
}
 
Example 12
Source File: ManageScriptsActivity.java    From MCPELauncher with Apache License 2.0 5 votes vote down vote up
public void importPatchFromFile() {
	Intent target = FileUtils.createGetContentIntent();
	target.setType("application/javascript");
	target.setClass(this, FileChooserActivity.class);
	target.putExtra(FileUtils.EXTRA_MIME_TYPES, ALL_SCRIPT_MIMETYPES);
	target.putExtra(FileUtils.EXTRA_SORT_METHOD, FileUtils.SORT_LAST_MODIFIED);
	startActivityForResult(target, REQUEST_IMPORT_PATCH);
}
 
Example 13
Source File: SimpleUploadOverwriteExistingFileActivity.java    From qiniu-lab-android with MIT License 5 votes vote down vote up
public void selectUploadFile(View view) {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(target,
            this.getString(R.string.choose_file));
    try {
        this.startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException ex) {
    }
}
 
Example 14
Source File: SimpleUploadUseReturnBodyActivity.java    From qiniu-lab-android with MIT License 5 votes vote down vote up
public void selectUploadFile(View view) {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(target,
            this.getString(R.string.choose_file));
    try {
        this.startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException ex) {
    }
}
 
Example 15
Source File: SimpleUploadUseSaveKeyFromXParamActivity.java    From qiniu-lab-android with MIT License 5 votes vote down vote up
public void selectUploadFile(View view) {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(target,
            this.getString(R.string.choose_file));
    try {
        this.startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException ex) {
    }
}
 
Example 16
Source File: SimpleUploadWithoutKeyActivity.java    From qiniu-lab-android with MIT License 5 votes vote down vote up
public void selectUploadFile(View view) {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(target,
            this.getString(R.string.choose_file));
    try {
        this.startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException ex) {
    }
}
 
Example 17
Source File: SimpleUploadUseMimeLimitActivity.java    From qiniu-lab-android with MIT License 5 votes vote down vote up
public void selectUploadFile(View view) {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(target,
            this.getString(R.string.choose_file));
    try {
        this.startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException ex) {
    }
}
 
Example 18
Source File: SimpleUploadEnableCrc32CheckActivity.java    From qiniu-lab-android with MIT License 5 votes vote down vote up
public void selectUploadFile(View view) {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(target,
            this.getString(R.string.choose_file));
    try {
        this.startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException ex) {
    }
}
 
Example 19
Source File: CallbackUploadWithKeyInUrlFormatActivity.java    From qiniu-lab-android with MIT License 5 votes vote down vote up
public void selectUploadFile(View view) {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(target,
            this.getString(R.string.choose_file));
    try {
        this.startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException ex) {
    }
}
 
Example 20
Source File: SimpleUploadWithKeyActivity.java    From qiniu-lab-android with MIT License 5 votes vote down vote up
public void selectUploadFile(View view) {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(target,
            this.getString(R.string.choose_file));
    try {
        this.startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException ex) {
    }
}