Reply
Thread Tools
EmaNymton's Avatar
Posts: 141 | Thanked: 267 times | Joined on May 2010 @ Germany
#1
Hi,
I'm trying to write an application that in some state needs to lock the phone. The application runs fullscreen and the user should only be able to reactivate the phone by a predefined PIN.
If the user presses the power button he can easily kill my application with "end current task" or he uses "Ctrl-Backspace" to activate the Taskmanager and kill the task then :/

Is there a way with python to disable both possibilities temporarily?
 
cutehunk04's Avatar
Posts: 472 | Thanked: 195 times | Joined on Jun 2010 @ India, Mumbai
#2
Originally Posted by EmaNymton View Post
Hi,
I'm trying to write an application that in some state needs to lock the phone. The application runs fullscreen and the user should only be able to reactivate the phone by a predefined PIN.
If the user presses the power button he can easily kill my application with "end current task" or he uses "Ctrl-Backspace" to activate the Taskmanager and kill the task then :/

Is there a way with python to disable both possibilities temporarily?
but why you want disable it... ???
__________________
Knowledge is knowing a tomato is a fruit; Wisdom is not putting it in a fruit salad
 
Posts: 104 | Thanked: 48 times | Joined on Jul 2010 @ Romania
#3
Originally Posted by cutehunk04 View Post
but why you want disable it... ???
So you won't be able to bypass the security software...
 
laasonen's Avatar
Posts: 565 | Thanked: 618 times | Joined on Jun 2010 @ Finland
#4
Best way I could think of to temporarily disable the power button menu:

Disable:
Code:
pkill -STOP systemui
Enable:
Code:
pkill -CONT systemui
If I remember right evilalarm tried to do something like this, you could look how it works.

I was once playing around with Qt and managed to create unkillable window
__________________
Couple of my applications:
ConnLock - Advanced phone lock
Sanakirja.org - A Sanakirja.org dictionary client
Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers

Last edited by laasonen; 2011-06-18 at 15:32.
 

The Following User Says Thank You to laasonen For This Useful Post:
EmaNymton's Avatar
Posts: 141 | Thanked: 267 times | Joined on May 2010 @ Germany
#5
Great, works for me!

Thank you for this short solution!

Remains the task swichter problem?!
 
laasonen's Avatar
Posts: 565 | Thanked: 618 times | Joined on Jun 2010 @ Finland
#6
Originally Posted by EmaNymton View Post
Great, works for me!

Thank you for this short solution!

Remains the task swichter problem?!
The task switcher doesn't work when the window is a dialog
__________________
Couple of my applications:
ConnLock - Advanced phone lock
Sanakirja.org - A Sanakirja.org dictionary client
Wlan Driver Selector Applet - Switch easily between stock and bleeding edge drivers
 

The Following 2 Users Say Thank You to laasonen For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 15:39.