Yeah !
This simpler solution is a good idea.
In the same way, could I propose maybe a different approach for this one ? :
Rather than use time limit (hours or days) to block RetroX if expired (maybe it is also possible for hacker to override this timer), is it feasible to limit instead the number of games/roms that can be launched when this switch "offline mode" option is enabled ?
Proposition examples :
- Allow selection of just few games/roms (2 or 3 slots) from our list ONLY WHEN the switch "offline mode" option is "OFF" (maybe with a specific "offline tag", like the favorite tag, or into a dedicated list with an additionnal screen interface),
- As is still connected to internet in this normal state :
_ send/synchronize this list of selected roms to your server (roms filenames or id) for control (check number of roms for examples, etc.),
_ prepare from your server a dedicated ACK file response (specific to the user account, date, maybe token, etc.),
_ inform user/gamer that "RetroX will take into account this change on next restart" (same behavior as rescan emulator folder),
_ on restart, get "ACK file" from server if exists, check it and save offline tag for each roms listed if it is OK.
- So, when switch "offline mode" option is "ON" :
_ disable internet connection functionnalities (of course),
_ disable option/interface of "offline games selection",
_ disable "launch" button of all game not tagged as "offline" : only enable those correctly tagged (maybe with ACK file control again),
_ keep this switch state "in memory" (retrox.data ?) for next app restart.
- Or simpler for the 1st point above (list of offline games) : only managed through your web interface (login.retrox.tv), with new additional admin screen, allowing user to fill directly 2 or 3 game filenames for example (so, requiring active account).
And the RetroX app restart will get for this user the "ACK file", ... etc.
Note : and so, according security against hacker, there is never guarantee ... but even if it is possible to bypass online games selection management (to override games offline tag into apk), an existing and correct additional "ACK file" would still required.
Anyway, it's maybe just not feasible or viable
And sorry for this very long message