dya2 / android-scripting

Automatically exported from code.google.com/p/android-scripting
0 stars 0 forks source link

Add Triggers for broadcast events #407

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Would like to tie a script directly to an OS level event such as 'incoming 
call', where the script is only triggered (run) when the phone starts to 
receive call, not constantly running or cron'd.  The following hooks would be 
excellent, though are not exhaustive. 

onScreenAwake ( the moment after screen lock is turned on/off)

onIncomingPhoneCall ( returns number of the incoming call, current 'state' 
(answered/unconnected etc)

onLocationChange (the location of the phone changed from it's previous 
position. Returns the previous position and the new position

onCopy / onPaste Events.

onGSensorChange: Example when the phone is placed facedown, or faceup, this 
event would fire. Optionally, would have a filter for 'when screen is on/off 
filter to avoid receving events while the phone is in use (or not in use) 
depending on the desired intent.

Original issue reported on code.google.com by Gregory....@gmail.com on 22 Aug 2010 at 1:38