![]() |
Answering Calls with proximity sensor
1 Attachment(s)
i created a small script that allows you to answer calls by getting the device near your ear (using proximity sensor).
if the sensor is closed when the script is run (like if there's a call while the device is in the pocket) it will not answer but wait for an open state and only then it will answer on close state. To use this feature you will have to set 2 dbus events invokes in "/etc/dbus-scripts.d/dbus-scripts-settings": [scripts path]/incomingcall.sh * * com.nokia.mce.signal sig_call_state_ind ringing normal [scripts path]/callend.sh * * com.nokia.mce.signal sig_call_state_ind none normal Set the scripts to with execute permissions. When a call comes, the incomingcall.sh is called, calling to the ProximityAnswerScan script. When the call terminates, the callend.sh script is called which causes the ProximityAnswerScan to end. After using it for some time now - it seems to be very comfortable way to answer calls - even when sometimes the device is not responsive when the call arrives. Hope you'll like it too. |
Re: Answering Calls with proximity sensor
how do you install these? by executing those 2 command lines above?
|
Re: Answering Calls with proximity sensor
f__k thats COOL. needs to be made into an app IMHO
edit: and ported to the N9 :D |
Re: Answering Calls with proximity sensor
Installed, now let's try...
EDIT: something needs to be killed, cause i don't feel like rebooting... EDIT2: ok, it's still not working. Here is what i did 1) placed the folder ProximityAnswer with 3 files in it in /home/user/ 2) created a file /etc/dbus-scripts.d/dbus-scripts-settings (i have dbus pakage installed, but i have only karam's dbus-scripts-settings-by-karam file, that's why i created a new one) 3) then i pasted these lines into that file: Code:
/home/user/ProximityAnswer/incomingcall.sh * * com.nokia.mce.signal sig_call_state_ind ringing normal Code:
chmod 777 /home/user/ProximityAnswer/for-each-script Code:
chmod +rwx /home/user/ProximityAnswer/for-each-script 6) called myself, but when i put the phone near the ear, i can see the screen is black, but the ringtone is still playing, and the call isn't getting answered. Please, can you please point where and what i did wrong |
Re: Answering Calls with proximity sensor
Didn't quite get you...
Isn't "/etc/dbus-scripts.d/dbus-scripts-settings" a file? How can i have those scripts in there? Sorry, i don't understand |
Re: Answering Calls with proximity sensor
hey sorry my instructions are wrong, try this:
1. extract files in attached zip into "/home/user/MyDocs/proxyanswer" 2. in file "/etc/dbus-scripts.d/dbus-scripts-settings" add Code:
/home/user/MyDocs/proxyanswer/incomingcall.sh * * com.nokia.mce.signal sig_call_state_ind ringing normal ------------ BTW, anyone know if this would work on N9? Im not sure if dbus-scripts/-settings etc installs... |
Re: Answering Calls with proximity sensor
1 Attachment(s)
Very nice idea. Was not working for me, so I touch it here and there in order to make it work.
All credits goes to impehan, thanks for the great tool. create file: /etc/dbus-scripts.d/dbus-scripts-answer_on_proximity Code:
/home/user/bin/ProximityAnswerScan * * com.nokia.mce.signal sig_call_state_ind ringing normal Code:
chmod +x /home/user/bin/ProximityAnswerScan Code:
/etc/init.d/dbus-script restart |
Re: Answering Calls with proximity sensor
a few remarks i forgot to add:
all scripts must be set to have execute permissions of course. "ProximityAnswerScan" and "callend.sh" scripts are using the path: "/home/user/smart/flags/" to create and delete a flag file "proximityanswerscan", so you need to create this folder with write permissions or set the scripts to point to some other location of your choosing. |
Re: Answering Calls with proximity sensor
It works fine for me, thx impeham and lidow!
is there anyway to do the same with to answer a call with hard press camera button or double click power button or something like that? im wondering cause very often I get a call and the screen stays black for a long while and sometimes I even miss the call before the screen comes back from black. thx both for a great idea |
Re: Answering Calls with proximity sensor
Why not put the temp flag file in /tmp?
|
All times are GMT. The time now is 18:03. |
vBulletin® Version 3.8.8