I solved this problem by checking the extension of the file I am receiving and if the received file's extension is a video file's extension then I am showing user a Toast to select only photo.
Below is the method I used to get the file's extension
public static String getImageExtensionFromPath(String imagePath) {
String[] imageNameArray = imagePath.split("/");
String imageName = imageNameArray[imageNameArray.length - 1];
String[] imageArray = imageName.split("\\.");
String finalImageName = imageArray[1];
return finalImageName;
}