![]() |
Detect button push when phone locked
Is there a way to detect a button push (for instance the camera button) when the phone is locked and have something happen, like run a script?
What I would like is to be able to reach in my pocket and push some button and have the phone vibrate for a moment if there are any notifications, so I don't have to pull the phone out and look for the light. I think it'd be a nice little feature. Could be a little code in the vibrations -- two buzzes for text messages, one for emails, something like that. |
Re: Detect button push when phone locked
dunno about a button but try call notify
|
Re: Detect button push when phone locked
Thanks, but that's not at all what I'm looking for. I want to be able to tell if there's a message without even taking my phone out of my pocket, let alone looking at the screen.
|
Re: Detect button push when phone locked
Maybe you can use dbus-monitor to see if there is still dbus button actions when the screen is locked and you press say camera key.
From what I understand, I believe dbus is active at all time so you should see the key action on dbus. |
Re: Detect button push when phone locked
I'm trying dbus-monitor --system and nothing appears when pressing the camera or volume buttons, sadly. Does that mean there's no way I can detect them?
Something does appear (but after a delay) when the power button is pressed. The delay is unfortunate but I could settle for it if need be. |
Re: Detect button push when phone locked
I tried listening to cam key on my device and got the same result you mentioned. On the other hand, it doesn't look like you can listen to volume key through dbus, maemo-status-volume grabs the key already. See http://wiki.maemo.org/Documentation/...me.2Fzoom_keys
Sorry I can't help further. |
Re: Detect button push when phone locked
There is a program that will add an icon to the status bar and will bleep and vibrate every N seconds when there is an unread msg or missed call, i don't remember the name right now though.
|
Re: Detect button push when phone locked
Hm, if what I was asking for is impossible maybe I'll try that out. I used to find it sometimes useful when one of my old phones did that, but also sometimes very annoying (buzzing periodically all night, just out of reach so it's a lot of effort to placate it...)
Perhaps it's functionality I missed reading about in Call Notify, which Matthew suggested above. |
Re: Detect button push when phone locked
Though not as convenient as the camera or volume buttons, the lock slider between the right speaker and audio port can do the trick. dbus-monitor --system shows several messages when I press it, but I think the most useful one out of them is this one:
signal sender=:1.13 -> dest=(null destination) serial=7006 path=/org/freedesktop/Hal/devices/platform_kb_lock; interface=org.freedesktop.Hal.Device; member=Condition string "ButtonPressed" string "cover" |
Re: Detect button push when phone locked
I'd considered that... My concern was that if I unlocked it to get a possible buzz I wouldn't be able to tell if I'd locked it again properly afterwards without getting the phone out.
|
All times are GMT. The time now is 17:29. |
vBulletin® Version 3.8.8