Skip to content

Instantly share code, notes, and snippets.

@melikeeroglu
Created September 30, 2020 06:10
Show Gist options
  • Save melikeeroglu/f12a7cedd2574397ed6fdc5dc932e201 to your computer and use it in GitHub Desktop.
Save melikeeroglu/f12a7cedd2574397ed6fdc5dc932e201 to your computer and use it in GitHub Desktop.
HiAnimals onAddOrQueryPhoto
@Override
public void onAddOrQueryPhoto(List<Photo> photoList) {
photo = photoList.get(0);
Intent intent = new Intent(AnimalActivity.this, PhotoActivity.class);
//creates the temporary file and gets the path
Bitmap bitmap = BitmapFactory.decodeByteArray(photo.getPhoto(), 0, photo.getPhoto().length);
String filePath= tempFileImage(this,bitmap,"name");
//passes the file path string with the intent
intent.putExtra("path", filePath);
loadinPanel.setVisibility(View.GONE);
ivListPhoto.setClickable(true);
ivTakePhoto.setClickable(true);
startActivity(intent);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment