Skip to content

Adding lifecycle methods;

Tyler Sizse requested to merge issue_120_adding_lifecycle_methods into master

Closes #120 (closed). Add onStart(), onResume(), onPause(), onStop() methods to GuestScanFragment.java that can properly control what happens to the camera throughout the fragments lifecycle; That way the camera functions properly no matter the state of the fragment. I was originally noticing errors and problems with the camera/scanner when different lifecycles occurred.

TESTING: Launch the app and go to Guest Forms -> Guest Visit Check In (Local Database). Once at the scanner test different lifecycles of the fragment by pressing different buttons for example: back button, pressing home button, switch apps button. After you press one of those buttons, navigate back to the scanner. Make sure the scanner is scanning each time you revisit the scanner and check the log to make sure there are no errors occurring with the camera.

NOTE: See issue #118 (closed) to get the scanner working within the emulator

Edited by Tyler Sizse

Merge request reports