当前位置: 首页>>代码示例>>Java>>正文


Java FileUtils.createGetContentIntent方法代码示例

本文整理汇总了Java中com.ipaulpro.afilechooser.utils.FileUtils.createGetContentIntent方法的典型用法代码示例。如果您正苦于以下问题:Java FileUtils.createGetContentIntent方法的具体用法?Java FileUtils.createGetContentIntent怎么用?Java FileUtils.createGetContentIntent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.ipaulpro.afilechooser.utils.FileUtils的用法示例。


在下文中一共展示了FileUtils.createGetContentIntent方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getPath

import com.ipaulpro.afilechooser.utils.FileUtils; //导入方法依赖的package包/类
public void getPath(PathPreference pathPrefToSetValue)
{
    pathPref = pathPrefToSetValue;
    Intent getContentIntent = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(getContentIntent, "Select a file");
    startActivityForResult(intent, PATH_REQUEST_CODE);
}
 
开发者ID:dc914337,项目名称:PSD-Android-App,代码行数:8,代码来源:SettingsActivity.java

示例2: showChooser

import com.ipaulpro.afilechooser.utils.FileUtils; //导入方法依赖的package包/类
private void showChooser() {
    // Use the GET_CONTENT intent from the utility class
    Intent target = FileUtils.createGetContentIntent();
    // Create the chooser Intent
    Intent intent = Intent.createChooser(
            target, getString(R.string.chooser_title));
    try {
        startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException e) {
        // The reason for the existence of aFileChooser
    }
}
 
开发者ID:hsbadr,项目名称:MultiSystem,代码行数:13,代码来源:FileChooserActivity.java

示例3: onPickAFileClicked

import com.ipaulpro.afilechooser.utils.FileUtils; //导入方法依赖的package包/类
@OnClick(R.id.mPickAFileButton)
public void onPickAFileClicked() {
    // Create the ACTION_GET_CONTENT Intent
    Intent getContentIntent = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(getContentIntent,
            getString(R.string.pick_a_file));
    startActivityForResult(intent, REQUEST_CHOOSER);
}
 
开发者ID:guiguito,项目名称:AIRShare,代码行数:9,代码来源:LauncherActivity.java

示例4: selectUploadFile

import com.ipaulpro.afilechooser.utils.FileUtils; //导入方法依赖的package包/类
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) {
    }
}
 
开发者ID:qiniudemo,项目名称:qiniu-lab-android,代码行数:10,代码来源:SimpleUploadUseSaveKeyActivity.java

示例5: showChooser

import com.ipaulpro.afilechooser.utils.FileUtils; //导入方法依赖的package包/类
private void showChooser() {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(
            target, "Selece a file");
    try {
        startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException e) {
        // The reason for the existence of aFileChooser
    }
}
 
开发者ID:kishorm23,项目名称:WiFiSharer,代码行数:11,代码来源:MainActivity.java

示例6: showFileChooser

import com.ipaulpro.afilechooser.utils.FileUtils; //导入方法依赖的package包/类
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
    }
}
 
开发者ID:cdibened,项目名称:filechooser,代码行数:13,代码来源:FileChooser.java

示例7: showChooser

import com.ipaulpro.afilechooser.utils.FileUtils; //导入方法依赖的package包/类
private void showChooser() {
    // Use the GET_CONTENT intent from the utility class
    Intent target = FileUtils.createGetContentIntent();
    // Create the chooser Intent
    target.setType(FileUtils.MIME_TYPE_AUDIO);
    Intent intent = Intent.createChooser(target, getString(R.string.chooser_title));
    try {
        startActivityForResult(intent, REQUEST_CODE);
    } catch (ActivityNotFoundException e) {
        // The reason for the existence of aFileChooser
    }
}
 
开发者ID:mitchtech,项目名称:XposedCustomError,代码行数:13,代码来源:CustomErrorPreferenceActivity.java

示例8: onOptionsItemSelected

import com.ipaulpro.afilechooser.utils.FileUtils; //导入方法依赖的package包/类
/**
 * Called when a MenuItem is clicked. Handles adding of items
 *
 * @param item
 * @return
 */
@Override
public boolean onOptionsItemSelected(MenuItem item) {
	switch (item.getItemId()) {
		case R.id.content_add:
			Intent getContentIntent = FileUtils.createGetContentIntent();
			Intent intent = Intent.createChooser(getContentIntent, "Select a file");
			((HomeActivity) getActivity()).setRequestedActivity(true);
			startActivityForResult(intent, REQUEST_CHOOSER);
			return true;
		case R.id.content_image_capture:
			mTempResultFile = Utils.getRandomCacheFile(".jpg");
			Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
			cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(mTempResultFile));
			((HomeActivity) getActivity()).setRequestedActivity(true);
			startActivityForResult(cameraIntent, CONTENT_REQUEST);
			return true;
		case R.id.content_video_capture:
			mTempResultFile = Utils.getRandomCacheFile(".mp4");
			Intent videoIntent = new Intent(MediaStore.ACTION_VIDEO_CAPTURE);
			videoIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(mTempResultFile));
			((HomeActivity) getActivity()).setRequestedActivity(true);
			startActivityForResult(videoIntent, CONTENT_REQUEST);
			return true;
		case R.id.content_audio_capture:
			mTempResultFile = Utils.getRandomCacheFile(".3gp");
			((HomeActivity) getActivity()).setRequestedActivity(true);

			Intent audioIntent = new Intent(getActivity(), RecorderActivity.class);
			audioIntent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(mTempResultFile));
			startActivityForResult(audioIntent, CONTENT_REQUEST);
			return true;
		default:
			return super.onOptionsItemSelected(item);
	}
}
 
开发者ID:droidstealth,项目名称:droid-stealth,代码行数:42,代码来源:ContentFragment.java

示例9: importFileChooser

import com.ipaulpro.afilechooser.utils.FileUtils; //导入方法依赖的package包/类
private void importFileChooser(int format) {
    Intent target = FileUtils.createGetContentIntent();
    // target.setType(FileUtils.MIME_TYPE_TEXT);
    Intent intent = Intent.createChooser(target, getString(R.string.chooser_title));
    try {
        startActivityForResult(intent, format);
    } catch (ActivityNotFoundException e) {
        // The reason for the existence of aFileChooser
    }
}
 
开发者ID:mitchtech,项目名称:XposedMacroExpand,代码行数:11,代码来源:MacroPreferenceActivity.java

示例10: pickIcon

import com.ipaulpro.afilechooser.utils.FileUtils; //导入方法依赖的package包/类
/**
 * Lets the user pick a new icon from their own folder
 */
private void pickIcon() {
	Intent getContentIntent = FileUtils.createGetContentIntent();
	getContentIntent.setType("image/*");
	Intent intent = Intent.createChooser(getContentIntent, Utils.str(R.string.morph_select_image));
	((HomeActivity) getActivity()).setRequestedActivity(true);
	startActivityForResult(intent, REQUEST_CHOOSER);
}
 
开发者ID:droidstealth,项目名称:droid-stealth,代码行数:11,代码来源:MorphingFragment.java

示例11: requestFileChooser

import com.ipaulpro.afilechooser.utils.FileUtils; //导入方法依赖的package包/类
public void requestFileChooser(OnFileChosenListener requester) {
	currentFileChoiceListener = requester;
	Intent target = FileUtils.createGetContentIntent();
	Intent intent = Intent.createChooser(target,
			getResources().getString(R.string.file_select));

	try {
		startActivityForResult(intent, REQCODE_FILECHOOSE);
	} catch (ActivityNotFoundException e) {
		// The reason for the existence of aFileChooser
	}
}
 
开发者ID:AlexJF,项目名称:TrackMyMoney,代码行数:13,代码来源:PreferencesActivity.java

示例12: openSelectPicDialog

import com.ipaulpro.afilechooser.utils.FileUtils; //导入方法依赖的package包/类
private void openSelectPicDialog()
{
    Intent getContentIntent = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(getContentIntent, "Select a file");
    startActivityForResult(intent, REQUEST_CODE);
}
 
开发者ID:dc914337,项目名称:PSD-Android-App,代码行数:7,代码来源:PassActivity.java

示例13: showImportDialog

import com.ipaulpro.afilechooser.utils.FileUtils; //导入方法依赖的package包/类
protected void showImportDialog() {
    Intent target = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(
            target, "Select survey to import");
    startActivityForResult(intent, IMPORT_SURVEY_REQUEST_CODE);
}
 
开发者ID:openforis,项目名称:collect-mobile,代码行数:7,代码来源:SurveyListActivity.java

示例14: startFileChooser

import com.ipaulpro.afilechooser.utils.FileUtils; //导入方法依赖的package包/类
public void startFileChooser(){
    Intent getContentIntent = FileUtils.createGetContentIntent();
    Intent intent = Intent.createChooser(getContentIntent, getString(R.string.print_select_a_document));
    startActivityForResult(intent, REQUEST_CHOOSER);
}
 
开发者ID:yeokm1,项目名称:nus-soc-print,代码行数:6,代码来源:PrintFragment.java


注:本文中的com.ipaulpro.afilechooser.utils.FileUtils.createGetContentIntent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。