android camera : Failure delivering result ResultInfo{who=null, request=0, result=-1, data=null} to activity

Make sure you have both Camera Permission and READ/WRITE External Storage Permissions. Try this is working like charm with me private String selectedImagePath = “”; final private int PICK_IMAGE = 1; final private int CAPTURE_IMAGE = 2; public Uri setImageUri() { // Store image in dcim File file = new File(Environment.getExternalStorageDirectory() + “/DCIM/”, “image” + … Read more

How to check that a uri string is valid

A well-formed URI implies conformance with certain RFCs. The local path in your example is not conformant with these. Read more in the IsWellFormedUriString documentation. A false result from that method does not imply that the Uri class will not be able to parse the input. While the URI input might not be RFC conformant, … Read more

Android: Get thumbnail of image on SD card, given Uri of original image

You can simply create thumbnail video and image using ThumnailUtil class of java Bitmap resized = ThumbnailUtils.extractThumbnail(BitmapFactory.decodeFile(file.getPath()), width, height); public static Bitmap createVideoThumbnail (String filePath, int kind) Added in API level 8 Create a video thumbnail for a video. May return null if the video is corrupt or the format is not supported. Parameters filePath … Read more