below is my code but is not give me image path in onActivity result
Uri selectedImageUri = data.getData();
selectedImagePath = getPath(selectedImageUri);
Log.w("jay", "Camera Image Path :" + selectedImagePath);
Toast.makeText(MiscansOther_pannel.this, selectedImagePath,
Toast.LENGTH_LONG).show();
This works for me...
Code:
Method:
getRealPathFromURI()
EDIT:
As I noticed in some device after captured image the data in
onActivityResult()
is null,So the alternate way, Pass the specific image filename as a argument to your Intent for capture image as
putExtra
parameter.Then also insert this image Uri in Media Store, Now use this Uri for your further use,
You can check whether image is captured or not by
File.exist()
,Code looks like,
Now, you can use the same method for get file path from Uri,
in this case it will be in
onActivityResult()
,