In your onActivityResult
, you put:
if (resultCode == RESULT_OK){
...
}
you should put:
if (resultCode == RESULT_OK && requestCode==cameraData){
...
}
That is how you know the result is coming from the Camera Intent...
EDIT:
Try using this onActivityResult
instead of yours:
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (requestCode == cameraData && resultCode == RESULT_OK) {
Bitmap photo = (Bitmap) data.getExtras().get("data");
iv.setImageBitmap(photo);
}
}
Hope this helps!