fix import file type on login page
This commit is contained in:
parent
aeb44ee8d5
commit
89e00914ce
|
@ -796,12 +796,12 @@ public class LoginActivity extends BaseActivity {
|
||||||
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
|
||||||
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
intent.addCategory(Intent.CATEGORY_OPENABLE);
|
||||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
|
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.KITKAT) {
|
||||||
intent.setType("application/vnd.ms-excel");
|
intent.setType("*/*");
|
||||||
String[] mimetypes = {"application/vnd.ms-excel"};
|
String[] mimetypes = {"*/*"};
|
||||||
intent.putExtra(Intent.EXTRA_MIME_TYPES, mimetypes);
|
intent.putExtra(Intent.EXTRA_MIME_TYPES, mimetypes);
|
||||||
startActivityForResult(intent, PICK_IMPORT);
|
startActivityForResult(intent, PICK_IMPORT);
|
||||||
}else {
|
}else {
|
||||||
intent.setType("application/vnd.ms-excel");
|
intent.setType("*/*");
|
||||||
Intent pickIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
Intent pickIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
|
||||||
Intent chooserIntent = Intent.createChooser(intent, getString(R.string.toot_select_import));
|
Intent chooserIntent = Intent.createChooser(intent, getString(R.string.toot_select_import));
|
||||||
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] {pickIntent});
|
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] {pickIntent});
|
||||||
|
|
Loading…
Reference in New Issue