On galaxy alpha (forums still pretty empty), ATT bootloader locked so whatever I can accomplish stock for now.
I'm trying to create way to detect and count taps on the case to launch a task while the phone is asleep. For now, the goal is something like three taps on phone back while in shirt pocket to call my wife on soeakerphone (mic seems to cope well enough with the pocket).
Can't use Xperience etc without root.
Detecting a front/back shake with very short duration and moderate sensitivity seems to work OK. Plenty of false detections, but my plan was to count and require say a group of three in one second to launch the task.
So I set a variable 1 equal to time in milliseconds with a tap, variable 2 equal to time minus var 1, and var 3 equal to time minus var 2. If both var 2 and 3 are under a threshold, and/or their sum is below a threshold, launch task.
Works, except.... the sampling rate seems too slow. I can seem to detect taps closer than about one second, which makes the action both awkward and too prone to random false triggers. Looking at the monitoring settings, I don't see how to affect this.
Any ideas on how to fix what I'm doing, or suggestions on a better route entirely to take?
I'm trying to create way to detect and count taps on the case to launch a task while the phone is asleep. For now, the goal is something like three taps on phone back while in shirt pocket to call my wife on soeakerphone (mic seems to cope well enough with the pocket).
Can't use Xperience etc without root.
Detecting a front/back shake with very short duration and moderate sensitivity seems to work OK. Plenty of false detections, but my plan was to count and require say a group of three in one second to launch the task.
So I set a variable 1 equal to time in milliseconds with a tap, variable 2 equal to time minus var 1, and var 3 equal to time minus var 2. If both var 2 and 3 are under a threshold, and/or their sum is below a threshold, launch task.
Works, except.... the sampling rate seems too slow. I can seem to detect taps closer than about one second, which makes the action both awkward and too prone to random false triggers. Looking at the monitoring settings, I don't see how to affect this.
Any ideas on how to fix what I'm doing, or suggestions on a better route entirely to take?