Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
288 views
in Technique[技术] by (71.8m points)

android - How to stop certain apps from opening at all?

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...