删除联系人 select 选项表单文件 select 选项
Remove Contact select option form file select options
我正在打开文件选择 Intent,波纹管代码
Intent intent_upload = new Intent();
intent_upload.setType("*/*");
intent_upload.setAction(Intent.ACTION_GET_CONTENT);
activity.startActivityForResult(intent_upload, Constants.FILE_PICK_REQUEST_CODE);
我想从列表中删除联系人选项,请任何人帮忙。
谢谢
您需要指定要打开的意图(应用程序)类型。现在你设置为我提供所有应用程序:
intent_upload.setType("*/*");
对于图像、音乐、文档等,这可以是不同的类型。例如:
intent.setType("image/*");
正如 CommonsWare 所说,除了设置特定的 MIME_TYPES
并忽略使用 "*/*"
,您别无选择。像这里一样使用指定的 MIME_TYPES
..
String[] mimetypes = {"image/*", "video/*"};
Intent intent_upload = new Intent();
intent_upload.setType("image/*,video/*");
intent_upload.putExtra(Intent.EXTRA_MIME_TYPES, mimetypes);
intent_upload.setAction(Intent.ACTION_GET_CONTENT);
MainActivity.this.startActivityForResult(intent_upload, Constants.FILE_PICK_REQUEST_CODE);
使用下面的代码我认为它可以帮助你,也可以参考Link
Intent intent_upload = new Intent();
intent_upload.setType("*/*");
intent_upload.setAction(Intent.ACTION_GET_CONTENT);
intent_upload.addCategory(Intent.CATEGORY_OPENABLE);
activity.startActivityForResult(intent_upload, Constants.FILE_PICK_REQUEST_CODE);
我正在打开文件选择 Intent,波纹管代码
Intent intent_upload = new Intent();
intent_upload.setType("*/*");
intent_upload.setAction(Intent.ACTION_GET_CONTENT);
activity.startActivityForResult(intent_upload, Constants.FILE_PICK_REQUEST_CODE);
我想从列表中删除联系人选项,请任何人帮忙。
谢谢
您需要指定要打开的意图(应用程序)类型。现在你设置为我提供所有应用程序:
intent_upload.setType("*/*");
对于图像、音乐、文档等,这可以是不同的类型。例如:
intent.setType("image/*");
正如 CommonsWare 所说,除了设置特定的 MIME_TYPES
并忽略使用 "*/*"
,您别无选择。像这里一样使用指定的 MIME_TYPES
..
String[] mimetypes = {"image/*", "video/*"};
Intent intent_upload = new Intent();
intent_upload.setType("image/*,video/*");
intent_upload.putExtra(Intent.EXTRA_MIME_TYPES, mimetypes);
intent_upload.setAction(Intent.ACTION_GET_CONTENT);
MainActivity.this.startActivityForResult(intent_upload, Constants.FILE_PICK_REQUEST_CODE);
使用下面的代码我认为它可以帮助你,也可以参考Link
Intent intent_upload = new Intent();
intent_upload.setType("*/*");
intent_upload.setAction(Intent.ACTION_GET_CONTENT);
intent_upload.addCategory(Intent.CATEGORY_OPENABLE);
activity.startActivityForResult(intent_upload, Constants.FILE_PICK_REQUEST_CODE);