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?
Files Protection
Moderator: Martin
Files Protection
No.1 Automation app in play store Automagic Premium
Samsung Galaxy j2 non rooted.
Android 5.1.1
Samsung Galaxy j2 non rooted.
Android 5.1.1
- digitalstone
- Posts: 342
- Joined: 21 Oct 2017 12:36
- Location: The Netherlands
Re: Files Protection
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.
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.
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)
Re: Files Protection
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.

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.
Code: Select all
value == "yourpassword"
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.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.