GuestScanFragment.java - Update GUEST_NAME initialization value
Right now, line 82 (GuestScanFragment.java) is set to a constant “Test”
for testing purposes:
final String GUEST_NAME = "Test";
It should be replaced with the following code in the future:
final String GUEST_NAME = db.isRegistered(barcode);
This is so that it can send the correct data to GuestScanConfirmationFragment.java, which will then determine if the guest needs to be sent to the registration activity or not based on this value. Right now, isRegistered()
method will always return null
, until registration registers a guest with a barcode. So, we left it set to “Test”
so we could test/access the GuestQuestionnaireFragment.java without having to be registered.
NOTE!: The isRegistered()
method may be moved to a new class called GuestFormSource.java in the following merge request: !142 (merged). So, the class that line 76 (GuestScanFragment.java) is using may need to be updated to reflect the changes. Right now line 76 reads:
GuestFormHelper db = new GuestFormHelper(requireContext());
It may need to be updated to:
GuestFormSource db = new GuestFormSource(requireContext());
db.open();