The code below is not a complete solution to your need. It only shows how to circumvent the question of the calculation of an absence interval using a timer, taking advantage of a code sequence developed for another application.
-
The database connection to be able to identify each student was only conceptually circumvented, as it is necessary to know the format of the data at the source.
-
Once there may be more than one student absent, it will need a process counter... this either has not been completely contemplated.
-
Since the application will need to remain active all the time in which there is some absence ongoing, resources will be needed to keep the screen alive and the Sleep Mode does not abort the processes. This is resolved by installing an extent quoted below.
-
As you will need to interspers multiple screens for each ongoing process, there is a correct method to take care of the switching between the various screens.
-
Another extension takes care that when the application ends does not remain any process or any active screen.
-
A subsequent process that reads the database saved -to each computed interval- » "Student ###" & "Interval mm:ss absent" for a certain period, it will be necessary to make an eventual sum for each student and compose a report of absences, including grouping the results of the various devices spaced by each classroom.
-
With a little dedication and consultation to other topics on how to connect the database, the help from Power Users and some adaptations, you will be able to take advantage of this code to compute individual intervals for each absent student.
The basic screens of the whole process are as follows »
The extensions used are as follows:
** The app cannot be distributed to other classrooms via Google Play Store. Will be distributed via .apk
The main code blocks that process the timed range -on the 'Starting the Interval' screen- are these »
The rest of the code can be found in the attached *.aia file »
Monitoring_Lapse.aia (204.5 KB)
I hope I helped
@Lito
@>-->---

