Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- protected void onDestroy() {
- super.onDestroy();
- }
- @Override
- protected void onPause() {
- super.onPause();
- // on pause turn off the flash
- turnOffFlash();
- }
- @Override
- protected void onRestart() {
- super.onRestart();
- }
- @Override
- protected void onResume() {
- super.onResume();
- // on resume turn on the flash
- if(hasFlash)
- turnOnFlash();
- }
- @Override
- protected void onStart() {
- super.onStart();
- // on starting the app get the camera params
- getCamera();
- }
- @Override
- protected void onStop() {
- super.onStop();
- // on stop release the camera
- if (camera != null) {
- camera.release();
- camera = null;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement