rleiman Well-Known Member Licensed User Longtime User Jul 8, 2013 #1 Hi Everyone, In my app is there a way to detect if a user turns the phone off or reboots it? If there is I would like to delete a text file at that time like: B4X: File.Delete(File.DirDefaultExternal, "MasterControl.txt") Thanks.
Hi Everyone, In my app is there a way to detect if a user turns the phone off or reboots it? If there is I would like to delete a text file at that time like: B4X: File.Delete(File.DirDefaultExternal, "MasterControl.txt") Thanks.
NJDude Expert Licensed User Longtime User Jul 8, 2013 #2 If you need to just delete that file when the user reboots, then add a "run at boot" service, that's a simple way of doing it. Upvote 0
If you need to just delete that file when the user reboots, then add a "run at boot" service, that's a simple way of doing it.
rleiman Well-Known Member Licensed User Longtime User Jul 10, 2013 #3 Hi, Thanks for the reply. I searched the forum for "run at boot" and found it needed to go here: B4X: #Region Module Attributes #StartAtBoot: True #End Region Upvote 0
Hi, Thanks for the reply. I searched the forum for "run at boot" and found it needed to go here: B4X: #Region Module Attributes #StartAtBoot: True #End Region