-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCode-A-Thon_2023_Changelog.txt
More file actions
74 lines (62 loc) · 4.78 KB
/
Code-A-Thon_2023_Changelog.txt
File metadata and controls
74 lines (62 loc) · 4.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
LightSys Code-A-Thon 2023 Changelog
Authors: Chris LaFave, Eli Bolleddu, and Dr. John Hunt.
Dates: March 6th-10th, 2023
Goals:
1. - Update the app for the latest SDK and WorkManager release. The app uses the WorkManager library
to handle checking for updates and notifications, and this library has continued to improve over time.
2. - Fix a bug where event schedule times are sometimes printed incorrectly on the main app activity. For
example, 12:30 might be printed as 1:23 or something like that instead.
3. - Add a setting (coming from the configuration on the server) to allow the event manager to permit
event participants to share the event's QR code with other participants during the time period that the
event is active (there is an event expiry date in the event configuration). The server side is coded in
PHP, and the change there would be adding a database table field and a checkbox in the user interface.
Updates:
1. Update SDK and WorkManager
-build.gradle (:app) now has SDK version of 33 (did not change min SDK, still 21)
-build.gradle (:app) now has 2.8.0 of WorkManager
-The app has been automatically updated to support androidx libraries (instead of some stuff before)
-launchQRScanner now has an onDestroy() method with a try-catch that is necessary for the app running on the new updates
2. Fix HM:M bug
-In WelcomeView, on line ~207, in the if statement, it was *next*Event.getTimeStart(), instead of *current*Event.getTimeStart()
3. Add Share QR feature
-In MainActivity, onLongClick() now checks whether or not a user is allowed to share the QR code
-If yes:
promptLongClick() is shown, asking the user to choose between sharing or deleting the event
If "Share QR" is clicked, the current event's QR is shown
If "Delete Event" is clicked, the normal delete event window is shown
-If no:
The normal delete event window is shown
-It is able to check because a new column was added to the backend, called "allow_qr_share", toggling whether or not the users should be allowed to share the QR code
-Creating the QR code image is in the new promptShareQR() method in MainActivity
-It uses https://github.com/androidmads/QRGenerator
Things to update in the future:
-When sharing the QR Code, it checks the permissions of the event you are looking at, not the event being long-clicked
Dr. Hunt's PHP Documentation:
Controlling the ability to share a QR code
This is an outline of what is needed to add an event configuration item. Out initial use case is a flag to
determine of users of an event are allowed to directly share a QR code. However, we wish to consider
the problem of changing the behavior of the app for different events (here an event might be a
conference).
In the current event setup program (event/general.php) there are several checkbox prompts that seem
similar to the problem we are addressing; specifically “Allow a User to Attend Remotely:”. My current
thought is that this should be a model of what we want; because it is a flag that is varied by events. So
how is “Allow a User to Attend Remotely:” implemented?
The first thing to notice is that this field does NOT affect the way the cell phone app behaves, which may
make it a poor model of what we want. This flag is manipulated in “general.php”. It is displayed and set
using html/javascript. In the php array “$get_event_res” it has the index of “view_remote”. This
“vew_remote” is also used as a column name that is read and updated from the “event” table, where it
is defined as a boolean column in event (see: events/eventApp-data.sql for a create statement).
Ok, so this gets up from the setup screen to the database. How does it get from the database to the cell
phone app? The php program “getevent_data.php” reads the event table and builds a php array called
“$output[general]” which is a array containing the column values from the database as members of
general, the index for this field in general is “remote_viewing” this is done in the method add_data. The
add_data function is called by getevent.php and also by get.php. Indeed we confirm that the android
app gets the array general and uses the expected string subscripts.
Given this the most direct way forward is to add a column to the event table by modifying eventApp-
data.sql, modify getevent_data.php and the add_data method to move the column value into general
and then on the app side check the value of this array element.
Changes made add column “allow_qr_share” in eventApp-data.sql of type boolean (default is nullable).
Use alter command to add allow_qr_share to existing db. Change getevent_data.php in add_data
method to put allow_qr_method in the array “general”. Modify general.php to prompt, then assign
choice to “allow_qr_share”. This will now set the column in the database and use the value to update
the screen.