I am developing a simple screen lock application.
I want that when I click on the app icon the screen gets locked and turns off. And am also able to do that, BUT before locking the screen the main activity gets launched (Set to Theme.NoDisplay) which takes time to get the device locked, which I don't want to happen.
So is there a way that I can turn off my screen (OR do something like starting Torch) without launching the app activity. If required I can also provide the code which i am with.