I need to get the URI of an image stored on an SDCARD.
When I want to get a Uri of an image stored on a drawable, I use this and it works fine:
i.putExtra(Intent.EXTRA_STREAM, Uri.parse("android.resource://" + getPackageName() + "/" + R.drawable.image));
But if I want to get the URI of an image stored on an SDCARD, I tried with this and it doesnβt work, something is wrong:
i.putExtra(Intent.EXTRA_STREAM, Uri.parse("/mnt/sdcard/car.jpg"));
Please can someone tell me how to get the correct uri of the image stored on the SD card?
thanks
android uri android-sdcard
Nullpointerinterception
source share