add some shutter audio

This commit is contained in:
tibbi 2016-06-11 19:34:34 +02:00
parent 9b8a8777f6
commit 67286b9a88
2 changed files with 2 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import android.app.Activity;
import android.content.Context;
import android.graphics.Rect;
import android.hardware.Camera;
import android.media.MediaPlayer;
import android.os.Handler;
import android.util.Log;
import android.view.MotionEvent;
@ -127,6 +128,7 @@ public class Preview extends ViewGroup implements SurfaceHolder.Callback, View.O
} else {
parameters.setFlashMode(Camera.Parameters.FLASH_MODE_OFF);
}
MediaPlayer.create(getContext(), R.raw.camera_shutter).start();
camera.setParameters(parameters);
camera.takePicture(null, null, takePictureCallback);
}

Binary file not shown.