I want an app to run only once and not run for the second time. Even if the app is uninstalled and re-installed.in below blocks, when app run in once ,user click on button and save a number in a file. for the second time ,first app read number from file and then close the App.
When we run the program for the first time(in real device), it asks for permission to read the file and does not want it for the next time(APP CLOSE), but if I uninstall the program, it wants permission to access again. I want to copy the file and read the file without asking this access level. I am a teacher and I want to do a test that my students can only do once and cannot do for the second time, even if they uninstall the program.UP BLOCKS ACT IN EMULATORS BUT DIDNOT ACT IN REAL DEVICES.
Is there no other way for the user to run the app only once and not be able to run the app again even if the app is uninstalled and reinstall?And there is no need to these permissions for accesses.
you might want to store in an online database, if the app already was run by a user (you will need a method to identify the device or the user) and check this on each run of the app
Hi thanks .how?I work read and write data to google sheet.can i use this method?
if we run the program for the first time(in real device in offline ,see above), it asks for permission to read the file .Is it possible (offline) that if the program asks for access and the user does not allow it(deny), the program will be closed and only continue if the user is allowed access? How?
you do not have to read/write a file if you store the information online
in case it is sufficient to identify the user, you could use the Pick Google Account extension and store the current user on the server, after each start of the app then check, if that user already is available in the server database, if yes, close the app
if we run the program for the first time(in real device in offline ,see above), it asks for permission to read the file .Is it possible (offline) that if the program asks for access and the user does not allow it(deny), the program will be closed and only continue if the user is allowed access? How?