![]() |
2010-10-18
, 16:37
|
Posts: 1,751 |
Thanked: 844 times |
Joined on Feb 2010
@ Sweden
|
#2
|
![]() |
2010-10-18
, 16:42
|
|
Posts: 44 |
Thanked: 53 times |
Joined on Apr 2010
@ amsterdam
|
#3
|
Hello,
I need to run a script when answering my phone call. Without using python. The idea is to use QBW or a script in bash / sh.
How I can detect this event? An example please ...
![]() |
2010-10-18
, 16:46
|
Posts: 433 |
Thanked: 274 times |
Joined on Jan 2010
|
#4
|
The Following User Says Thank You to Pigro For This Useful Post: | ||
![]() |
2010-10-18
, 16:52
|
|
Posts: 2,473 |
Thanked: 12,265 times |
Joined on Oct 2009
@ Jerusalem, PS/IL
|
#5
|
MohammadAG-N900:~# cat /usr/bin/out-call-vibro.sh #!/bin/sh if [ -f /var/run/out-call-vibro/out-call-vibro.pid ] then echo Process is already running... exit 1 fi echo $$ > /var/run/out-call-vibro/out-call-vibro.pid vibro() { if grep -q "Call answered"; then if [ `cat /sys/devices/platform/gpio-switch/proximity/state` = "open" ]; then echo 150 > /sys/class/leds/twl4030:vibrator/brightness gsleep 0.5 echo 0 > /sys/class/leds/twl4030:vibrator/brightness fi fi } monitor() { dbus-monitor --session type='signal',interface='org.freedesktop.Telepathy.Channel.Interface.Group',member='MembersChanged' | while read line ; do vibro ; done } monitor # End
![]() |
2010-10-18
, 16:53
|
Posts: 1,751 |
Thanked: 844 times |
Joined on Feb 2010
@ Sweden
|
#6
|
![]() |
2010-10-19
, 10:32
|
Posts: 561 |
Thanked: 75 times |
Joined on Jan 2010
@ Spain
|
#7
|
I need to run a script when answering my phone call. Without using python. The idea is to use QBW or a script in bash / sh.
How I can detect this event? An example please ...