List of usage examples for android.content Intent setTypeAndNormalize
public @NonNull Intent setTypeAndNormalize(@Nullable String type)
From source file:com.afwsamples.testdpc.common.Util.java
public static void showFileViewerForImportingCertificate(PreferenceFragment fragment, int requestCode) { Intent certIntent = new Intent(Intent.ACTION_GET_CONTENT); certIntent.setTypeAndNormalize("*/*"); try {/*ww w .j ava 2 s . c o m*/ fragment.startActivityForResult(certIntent, requestCode); } catch (ActivityNotFoundException e) { Log.e(TAG, "showFileViewerForImportingCertificate: ", e); } }
From source file:com.afwsamples.testdpc.policy.PolicyManagementFragment.java
/** * Shows the file viewer for importing a certificate. */// w w w . j ava 2 s. c o m private void showFileViewerForImportingCertificate(int requestCode) { Intent certIntent = new Intent(Intent.ACTION_GET_CONTENT); certIntent.setTypeAndNormalize("*/*"); try { startActivityForResult(certIntent, requestCode); } catch (ActivityNotFoundException e) { Log.e(TAG, "showFileViewerForImportingCertificate: ", e); } }