Page 1 of 1
Files Protection
Posted: 03 May 2018 09:20
by Rafi4
Hi
I want to make a flow to protect my media files from delete. When I click delete option in gallery or my files, input dialog action need to delete my media files with password. How can I create? Any help? Because most important files may be delete by my friends. Is it possible?
Re: Files Protection
Posted: 03 May 2018 10:40
by digitalstone
I would recommend using one of the standard Android security locks to begin with.
You can set them on/off in Automagic with actions such as "Set Lock Pattern State" or "Set Lock PIN/Password".
Also, not to interfere with your personal life at all, just my 2 cents here... if you're not sure if your friends might delete your important files on purpose... you'll might consider reevaluation of some decisions.
Re: Files Protection
Posted: 03 May 2018 16:42
by Desmanto
Agreed with digitalstone, you probably need some new friends

Just kidding.
Well, sometimes circumstances force us, we have no choice but to deal with it. It seems your friends can access your phone freely on certain condition. Maybe set password won't help as well, as they might need to do something with your phone. Depends on the tech-savviness of your friends, you can just simply hide the gallery shortcut from the launcher. They might can access it from manage apps or some other mean. So you can protect the whole gallery or all file manager (they can delete from here too), using Trigger App Task Started. Put Input Dialog password and check the password typed using expression.
True, do nothing (you can continue using the app). False, Action Show home screen. This will force each time they open the protected apps, they have to provide the password. Wrong password will bounce them back to home screen, essentially locking out the app from usage. Try it out in different situation before leaving it to them, they might find a way to bypass it.
The other more sophisticated way it to use a full screen widget to block the screen. So after App task Started, you block out the screen by using show widget, so can't press anything after it. You can press home, and you should always coupled it with hide widget after Trigger App Task Ended. This is more dangerous to test, so make sure you try it with half widget first. As you can falsely lock out yourself and have to force restart your phone.