The Following 7 Users Say Thank You to Ilmanowar For This Useful Post: | ||
![]() |
2012-06-08
, 13:09
|
Posts: 18 |
Thanked: 7 times |
Joined on Jun 2012
|
#2
|
![]() |
2012-06-08
, 20:44
|
Posts: 48 |
Thanked: 85 times |
Joined on Feb 2010
|
#3
|
![]() |
2012-06-08
, 20:49
|
Posts: 1,341 |
Thanked: 708 times |
Joined on Feb 2010
|
#4
|
![]() |
2012-06-08
, 23:11
|
Posts: 48 |
Thanked: 85 times |
Joined on Feb 2010
|
#5
|
![]() |
2012-06-08
, 23:54
|
|
Posts: 1,503 |
Thanked: 2,688 times |
Joined on Oct 2010
@ Denmark
|
#6
|
I want to share a little bash application to have a anti-theft when we leave the phone charging. I hope somebody have ideas to make it better. If the phone is disconnected by the charger while the application is active the alarm start to sound.
The application sets to the maximum the volume before to play the sound.
There are 3 files, the police sound (it is a .wav) and 2 bash files (one the main program and the other is the checking battery charging status program). You need to set the correct directory in the main to call the subroutine file and to play correctly the sound.
I put they in ~/MyDocs/Appl_conf (if you do the same you don't need to modify the programs).
To call the application and to turn-off it I set two button in Cmd_shortcut:
Title: Alarm ON
Command: sh ~/MyDocs/Appl_conf/allarme.sh
Title: Alarm OFF
Command: kill `ps | grep allarme.sh | awk '{print $1}'`
link:
http://ilmanowar.altervista.org/stable/allarmeN900.zip
What it needs to be improved:
1) Make it start automatically. Make it stop automatically when recognize the owner (bluetooth? Look code?).
2) Disable the shut-down while the alarm is sounding.
Cheers.
Last edited by Ilmanowar; 2012-06-08 at 10:48. Reason: add external link