Syed
Syed

Reputation: 550

How to lock any android application

I am a newbie on android apps development, I want to make a application which can lock any application when started. For eg if someone opens chrome or any other application it simply locks it.

Upvotes: 0

Views: 3033

Answers (2)

Sandeep P
Sandeep P

Reputation: 4411

Android now allows users to add app widgets to the lock screen form API level 17, i dont know backward comparability supports or not

Upvotes: 0

Rasel
Rasel

Reputation: 15477

Maybe you will not get any straight forward solution for that.you have to create a service that will run on the background.You can check periodically to find therunning process.Then you can find the package name for the process which you want to kill.Finally use killBackgroundProcess of the ActivityManager to kill the process.This method only kill background process.So if you want to stop browser that starts running simply send that in background(If you bring your activity in foreground it automatically will be back) and run the killBackgroundProcess(pkgName).

Upvotes: 4

Related Questions