3) put our application in the background during the day so as not to lose the NFC check-in times
To start with the consequence of this choice, a program running in the background basically consumes power and processor time. In addition, you have no guarantee that the OS, or the user, or a dead battery will kill the program. So it's a choice that can be improved.
I recommend looking at the
[B4X] KVS - KeyValueStore library solution. Using B4X KVS is similar to using a Map. You initialize it once and then you can place or retrieve items using the Put, Get or GetDefault methods when opening the program and entering or reading the login and logout times. The only risk that remains is that the phone battery is empty during use, but what is the chance (ok
that happens to all of us sometimes, but you see that in contrast to those underwater activities of your OS that kill the program.) Another additional advantage is that you can also store information and if necessary you can also send or download the database.