Android Question Prevent the user from adding data directly

khwarizmi

Active Member
Licensed User
Longtime User
Hi all

I have an online database application which store pupils data, I don't want the pupils application to write data directly to the database, instead of that I want it to send this data to the admin application, how can I do that ??

thanks in advance
 

khwarizmi

Active Member
Licensed User
Longtime User
Am using mysql connected through php
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Not knowing your project, just considering your first post, I'll suggest to "park" info from pupils to a temp table or insert it straight to proper places but adding a "status" field set to a "waiting for approval" coded value. Once the admin, through his/her interface validates those data, your program will change the status to "approvaed", "discarded" and so on. Kind of a finite state machine. Details depend on real project at hand.
 
Upvote 0

khwarizmi

Active Member
Licensed User
Longtime User
this is a good idea, I want to complete it with a listener which tell the admin application automatically that there is a new record waiting for approval.
How can I do this ?
 
Upvote 0

udg

Expert
Licensed User
Longtime User
As you may expect, there a few ways to accomplish it.
If you need to alert the admin as soon as a new record is inserted (or any other situation that needs his/her immediate attention) then you should consider MQTT/Firebase messaging and similar solutions.
If it's up to the admin to check from time to time, than it will suffice to drive his/her attention on those records sporting a "wait for.." status.
Another option could be that the admin's app checks at given intervals the DB for pending statuses and sends a notification (in B4A terms) to the admin himself in order to solicit his attention to take action.
 
Upvote 0

khwarizmi

Active Member
Licensed User
Longtime User
Thanks a lot, so I will add a timer to check for the new record which is waiting for approval each minute.
 
  • Like
Reactions: udg
Upvote 0
Top