Category Archives: Android

In Android, How to obtain Uri of image on SD-Card

How to get URI of image stored on SD-Card? Step 1:- Read the image from SD-Card. [java]File sdCardDir = Environment.getExternalStorageDirectory(); File yourFile = new File(sdCardDir, “path/to/the/file/filename.ext”);[/java] Step 2:- Once you get object of image file, you can get URI of the image. [java]Uri imageUri = yourFile.toUri();[/java] Next:- You ready to use URI wherever you want….

Read More