Question

With User's permission, I want to be able to stop certain apps from opening at certain times of the day.

What I want to do is - when user clicks on an app icon, the app does not open - it just shows you a "Toast" message.

Can this be done?

I have researched online and cannot find a way to either do this or even fake the effect.

Was it helpful?

Solution

To actually stop the apps from launching would require your application to be signed by the same cert as the os (from the manufacturer), or to be run as root (on rooted devices). Samsung offers a program for Samsung SAFE (I believe SAFE is the one) in which you pay them to sign your application, and use their APIs for this kind of thing.

A way to "fake" this effect would be to run a background service which watches the foreground application, and if it is blacklisted (not allowed) then close it. This poses other issues such as timing, and still allowing tasks to start in the background.

So in short; No, this cannot be done unless you have a partnership with hardware vendors. And you can "fake" it but it won't be very reliable.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top