Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @OnClick(R.id.fab_take_photo)
- public void onTakePhoneButtonClicked() {
- lock();
- FileOutputStream outputPhoto = null;
- try {
- outputPhoto = new FileOutputStream(createImageFile(galleryFolder));
- textureView.getBitmap()
- .compress(Bitmap.CompressFormat.PNG, 100, outputPhoto);
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- unlock();
- try {
- if (outputPhoto != null) {
- outputPhoto.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement