private static final int SELECT_PHOTO = 1;
private static final int SELECT_VIDEO = 1;
They need to be different, having a value "1" means they go into the same "if" onActivityResult()
.
Also, its playing only video as that is your first "if" condition inside onActivityResult()
, which will always end up being true with:
startActivityForResult(intentGallery, 1);
startActivityForResult(intent, SELECT_PHOTO);
Pass both properly as you compare them. Try it:
private static final int SELECT_PHOTO = 1;
private static final int SELECT_VIDEO = 2;
startActivityForResult(intentGallery, SELECT_VIDEO);
startActivityForResult(intent, SELECT_PHOTO);
Should get some help from this