Objective: I want to open an intent chooser to show only the native Camera app and the native Gallery app.
What I have right now: I have the native Camera app, native Gallery app and all other apps that can open files(Astros File Manager, Photos app... etc)
So, is there anything I am missing? such that it would help limit my intent chooser to only show only the apps I need? (Gallery and Camera only)?
Thanks, for reading and would appreciate any comments or suggestions.
Intent galleryIntent = new Intent(Intent.ACTION_GET_CONTENT,null);
galleryIntent.setType("image/*");
galleryIntent.setClassName("com.google.android.gallery3d", "com.android.gallery3d.app.Gallery");
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
Intent chooser = new Intent(Intent.ACTION_CHOOSER);
chooser.putExtra(Intent.EXTRA_INTENT, galleryIntent);
chooser.putExtra(Intent.EXTRA_TITLE, "Select a Photo");
Intent[] intentArray = {cameraIntent};
chooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, intentArray);
startActivityForResult(chooser,CAMERA_CODE);