javaandroidandroid-intentpicking

Remove Contact select option form file select options


I am opening file pick Intent with, Bellow code

Intent intent_upload = new Intent();
    intent_upload.setType("*/*");
    intent_upload.setAction(Intent.ACTION_GET_CONTENT);
    activity.startActivityForResult(intent_upload, Constants.FILE_PICK_REQUEST_CODE);

I Want remove Contact option from list, please can anyone help.

Thanksenter image description here


Solution

  • Use below code I think it can help you and also refers 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);