• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[App][10-Jul-09] G-Trigger v0.9.2 beta, G-Sensor based ^shake^ detector

Search This thread

krups

Senior Member
Nov 4, 2008
288
30
Westbrook
Hi All,

Updates for G-Trigger (v0.9.0+ beta):

First is, you can shake your device to change wallpaper of Today/Manila/S2U2, second is, save a screenshot and third to show/hide SIP (As suggested by tevike)

I have lowered the threshold value up to 5 for front-back action as some people find it very hard to shake. Although lower value less than 10 does not work on my device. If you find hard to shake try setting threshold value for front-back lesser than 10 and uncheck option "Discard accidental shakes".

I have added priorities to profiles in this version. It is useful in combination with Auto-Trigger profile option. If you have one or more profile which satisfies auto-trigger option for current device state, then higher priority profile will be selected to trigger an action.

This version 0.9.0 beta seems to be pretty stable. Hope it works fine for all.

For updated features from v0.8.0 onwards look here.

G-Trigger website: http://g-trigger.kneps.com

Thanks,
Krupal Desai

====||====||====||====||====||====||====||====||====||====

G-Trigger v0.9.2 beta [10-Jul-2009]
By Krupal Desai


Video: See it in action...

G-Trigger is a G-Sensor based ^shake^ detector application. It allows to trigger a predefined action on shaking your mobile phone (built-in with G-Sensor) in particular direction. Currently it is in development phase, so please bare the bugs.

Supported shaking directions:
  • Horizontally
    • Left to right
    • Right to left
  • Vertically
    • Top to bottom
    • Bottom to top
  • Front & Back
    • Front to back
    • Back to front

It will trigger the specified action when phone is forcibly moved from left to right or moved as above mentioned directions. Also you can assign different actions with keeping device face up and shaking device in any of the above action or keeping device face down and shaking device in any of the above action.

Currently supported actions:
  • Close/Minimize active window
  • Dial a number
  • Answer/Reject incoming call
  • Launch Program
  • Ringer Loud/Vibrate/Silent
  • Screen orientation
  • Send Keys*
  • Task Switch
  • Turn On/Off screen
  • WiFi/Bluetooth/Phone radio - On/Off/Toggle
  • Media Controls#
  • Volume Control
  • Simulate Power Button - Power Off/Power On/Long Press Power Button
  • Open control panel settings
  • Activate profile
  • Save Screenshot (BMP/JPG/PNG/GIF at predefined location) *new
  • Change Wallpaper (Today Screen, Manila Home & S2U2) *new
  • Show/Hide/Toggle On-Screen Keyboard (SIP) *new

*Please refer to readme.txt for sending special keys.

#Currently supported media players are: Windows Media Player, S2P, Microfi Nitrogen, Core Player, TCPMP, Pocket Player, Pocket Music and Manila (TF3D) Music Tab.

G-TriggerService will be suspended till the program specified in exceptions list is active.

Known Facts:
  • OSD is displayed with some delay after event is occurred
  • Sometimes shake actions are not triggered when device is busy processing
  • Action Media Control "Stop" does not work for all players
  • Media controls for "Pocket Player" works till it's window is active or minimized (not working when in notification mode)

Further development:
  • Display configured actions as OSD when device is lightly shaked
  • Add more actions like "Navigate Manila Page", "Open Quick Launch" etc on shaking

It is developed for HTC Touch Diamond. I have not tested it on any other device. Let me know if you try it on other device.

NOTE: Although running this application does not seem to make any damage, I take no responsibility for any kind of damage caused to the device or data due to this application.

PS: Credits to Koushik Dutta for sharing G-Sensor managed code for Diamond. Many thanks to Ageye for sharing updated G-Sensor code for Samsung Omnia (here).

Usage:

  • Transfer .cab file to any location in device.
  • Run the .cab file and install application to device storage.
  • Run the “G-Trigger” shortcut from programs.
  • Click “New” button on “Action” tab.
  • Enable the check boxes for the actions you want to activate.
  • Assign any action by clicking “…” button on the right side of action text box.
  • Click “Save” button on edit profile page, again click “Save” button on main page.
  • Click “Start” button to start the service.
  • Shake your phone and enjoy!

How to shake the phone?
Hold the mobile phone facing yourself and perform following:
Left to Right:
Quickly move the phone from current position towards right hand side for about 6 inches (Increase speed during motion from slow to fast and suddenly stop at the end to feel the shock)

Top to Bottom:
Quickly move the phone from current position to downwards for about 6 inches (Increase speed during motion from slow to fast and suddenly stop at the end to feel the shock)

Front to Back:

FrontToBack.jpg


Hold the phone facing yourself and near to you.
Quickly move the phone from current position to far away from you for about 6 inches (Increase speed during motion from slow to fast and suddenly stop at the end to feel the shock)

Back to Front:
Hold the phone facing yourself and little far from you.
Quickly move the phone from current position to nearer to you for about 6 inches from the last position (Increase speed during motion from slow to fast and suddenly stop at the end to feel the shock)

Quick guide to Auto Trigger:
If you want G-Trigger to behave differently for different active program, it's now possible. For example, you want left to right for playing next track, right to left for playing previous track, only if Windows Media Player is active then create a new profile, assign left to right for next track, right to left for previous track and check "Auto Trigger" with program name as wmplayer.exe. Bingo!!! Its done.

How G-Trigger works:
G-TriggerService.exe application runs all the time and polls the G-Sensor to get current position of the device. It polls G-Sensor for about 10 times a second and observes the positions of the device. It keeps track of last 5 positions and scans all the 5 positions and checks if any shake is detected. If shake is detected it looks for action and triggers an action.

FAQ:
1. Does polling of G-Sensor all the time damages it?
-It does not seems to damage sensor by polling but I don’t take any responsibility in a case. Use it at your own risk!

2. Does G-TriggerService impacts my device’s battery power?
-Yes! It runs all the time as soon as your device is awake and it keeps on polling the G-Sensor, so it will consume some battery power. Although, I am running it all the time since I developed, I don’t see any legible battery consumption. Though you need to benchmark if you want to see exact battery consumption.

3.How much memory does G-TriggerService eats?
-G-TriggerService takes around 500KB when OSD is off and takes around 1MB if OSD is on.

Screenshots:

1_Action_Tab_v8.png
2.1_FaceUpActions_Profile2_v8.png
3_Advanced_Profile_v8.png
4_Actions_List_v8.png
5_Action_Condition_v8.png
5_Action_Condition_v8.png
6_Exceptions_Tab_v8.png
7_Advanced_Tab_v8.png
8_Feedback_Tab_v8.png
9_About_Tab_v8.png
11_Export_Settings_v8.png
12_BottomToTop_v8.png
13_FrontToBack_v8.png


Requirements:
HTC Touch Diamond (Not tested on any other device)
WM6.1/WM6.5/WM6.5.1
.Net Compact Framework v3.5

Supported devices as per user reviews:
  • HTC Touch Diamond
  • HTC Touch HD
  • HTC Touch Pro
  • Samsung Omnia (i900/i910)

Shake it at your own risk.

Bugs / Suggestions / Ideas are invited.

Email: [email protected]
Visit: http://g-trigger.kneps.com

I accept donation:
Click here to donate.

Donations Received:
2 USD chizzy58
10 USD 1800PocketPC.com
5 USD Jiri Kucera
3 USD Marek Pilarcik
5 USD 1800PocketPC.com
2 USD Daniel Pingen
10 USD mikeck (Mike Kanel)
3.33 USD rev0l
5 USD Jaz (Jasen Nannini)
10 USD Selby Stephen

Thanks a lot

AppToDate download count:
counter.png.php
 

Attachments

  • G-Trigger-v0.9.2.zip
    248.7 KB · Views: 6,311
Last edited:

krups

Senior Member
Nov 4, 2008
288
30
Westbrook
G-Trigger Change Log

G-Trigger v0.9.2 beta [10-Jul-2009]

  • Updated: Change Wallpaper Action with next/previous/random support
  • Fixed: Browsing for application files bug for "Launch Program" action

G-Trigger v0.9.1 beta [10-Jul-2009]

  • Fixed: Null reference bug on fresh installation

G-Trigger v0.9.0 beta [02-Jul-2009]

  • Added: Actions
    • Save Screenshot (BMP/JPG/PNG/GIF at predefined location)
    • Change Wallpaper (Today Screen, Manila Home & S2U2)
    • Show/Hide/Toggle On-Screen Keyboard (SIP)
  • Added: Added option to enable/disable debug logs
  • Added: Lower threshold value up to 5 for front-back actions
  • Added: Profile priority setting for auto-trigger profile option
  • Added: Included new samsung SDK for G-Sensor in setup
  • Fixed: Unable to detect screen is off on certain devices
  • Fixed: Auto Start Service on device boot up issue (introduced in 0.8.0)
  • Fixed: Few minor bugs

G-Trigger v0.8.1 beta [15-Jun-2009]
  • Fixed: Repeated debug logging like "There is something wrong with g-sensor! Lets refresh the sensor!"

G-Trigger v0.8.0 beta [14-Jun-2009]
  • Added: Different actions for shaking device when FaceDown and shaking device when FaceUp
  • Added: New user interface for organizing profiles with ease
  • Added: Auto-trigger profile option “Manila music is playing”
  • Added: Import/Export settings and/or profiles
  • Fixed: Samsung Omnia G-Sensor code to sort out issue of service crash after device is awake
  • Fixed: Auto-resize configuration utility dependent on resolution
  • Fixed: Faster editing of shake actions after opening edit profile once
  • Fixed: Modification to profile actions no more required to hit save button to make it active
  • Updated: Slight modification to shake algorithm to make front-back action more sensitive
  • Updated: new registry location ‘HKCU\Software\Kneps\G-Trigger’ (you will require to delete older location ‘HKCU\Software\G-Trigger’ manually, I apologize for this).

G-Trigger v0.7.1 beta [16-May-2009]
  • Added: Option to Discard Accidental Shakes (Uncheck this option if you feel very hard to shake)

G-Trigger v0.7.0 beta [10-May-2009]
  • Added: Actions
    • Open control panel settings
    • Activate profile
  • Added: Support for *.mscr file for 'Launch program' browsing
  • Added: Auto trigger profile when specified program is active
  • Added: Editing profile name
  • Fixed: Few minor bugs

G-Trigger v0.6.0 beta [26-Apr-2009]
  • Added: Actions
    • Bluetooth/Phone Radio - On/Off/Toggle
    • Simulate Power Button - Power On/Power Button Long Press
  • Updated: Optimized the shake detection algorithm
  • Added: Profiles - Quick change for the preset actions
  • Fixed: Error when comma entered in Program Launch arguments
  • Fixed: Few other minor bugs

G-Trigger v0.5.1 beta [13-Apr-2009]
  • Bug Fixed: Service start on device startup for all languages.

G-Trigger v0.5.0 beta [12-Apr-2009]
  • Added: Actions
    • Volume Control
    • Simulate Power Button
  • Added: Setting for vibrate LED number
  • Fixed: Delayed service start on device reboot
  • Fixed: Restart service when device is awake (for Samsung Omnia)

G-Trigger v0.4.0 beta [05-Apr-2009]
  • Added: Action for Media Control (Many more players)
  • Added: Conditional trigger action
  • Added: Disable Action Exceptions
  • Added: Option to disable actions when screen is off
  • Added: Option to suspend service during phone call
  • Added: AppToDate Support
  • Fixed few bugs

G-Trigger v0.3.2 beta [02-Apr-2009]
  • Bug fix: Omnia service crash on sleep
  • Added: Actions
    • Screen Off (With device lock)
    • Media Controls (Windows Media & Manila Music Tab)
  • Added: AppToDate Support

G-Trigger v0.3.1 beta [31-Mar-2009]
  • Service startup bug fixed
  • Added: Actions
    • WiFi On/Off/Toggle
    • Media Controls (Not yet implemented completely)

G-Trigger v0.3.0 beta [30-Mar-2009]
  • Added: Feedback settings (Vibrate, play sound & OSD)
  • Added: Actions
    • Task switch
    • Screen orientation
    • Ringer profile (Silent-Vibrate-Loud)
  • Fixed few bugs

G-Trigger v0.2.0 beta [23-Mar-2009]
  • Added: Exceptions list (Service will be suspended till application specified in exceptions list is active)
  • Added: Actions
    • Dial a number
    • Answer/Reject incoming call
    • Launch Program
    • Turn ON/OFF screen
    • Send Keys
    • Close/Minimize active window
  • Added: Errors will be logged to "G-Trigger\Log"
  • Updated: Shake algorithm optimization

G-Trigger v0.1.0 beta [18-Mar-2009]
  • First release
 
Last edited:

uniqueboy

Senior Member
Apr 11, 2006
1,421
5
?

Not got the time to test this right now, but can this app answer/end calls with a shake? or task switch? or end a running program? if not, then is it a possibility for future releases?:)
 

krups

Senior Member
Nov 4, 2008
288
30
Westbrook
In pipeline

Not got the time to test this right now, but can this app answer/end calls with a shake? or task switch? or end a running program? if not, then is it a possibility for future releases?:)

Currently not supported. But task switch & close foreground app are in pipeline.. though.. it will take some time :eek:. Thanks for idea about answer/end calls. :rolleyes:
 

wez89

Senior Member
Nov 24, 2008
1,947
336
Manchester
Ok just tested a few programs, found windows media player doesnt respond to any shakes, no message appears to come up so it registers the shake and program but fails to open winsows media player, anybody else have the same issue??

EDIT: got media player working! dont select the windows media player option from program files, instead goto the windows folder and select 'wmplayer.exe'
 
Last edited:

wez89

Senior Member
Nov 24, 2008
1,947
336
Manchester
Sorry about triple posting lol

I have also found in order to register a 'left to right' shake you have to start by shaking your phone to the right. Start by shaking your phone to the left for a 'Right to left' shake. If i shake my phone 'right to left' once, it opens the 'left to right' application. Hope this is clear.

'My documents' doesnt work with 'left to right' shake from what i have tried

Great app any way im sure once bugs are fixed this will be great :)
 

teorouge

Senior Member
Jul 29, 2008
2,599
294
40
Trento
Did anyone try this during car use? I mean, there is some g-force involved, in driving... steer, brake, accelerate, bumps... :D
 

wez89

Senior Member
Nov 24, 2008
1,947
336
Manchester
Did anyone try this during car use? I mean, there is some g-force involved, in driving... steer, brake, accelerate, bumps... :D

I havnt tried it during driving but im sure braking, steering and accelerating will have no effect although a big and i mean a big bump or bang may just shake the device abit :p

You need a quick, hard shake for it to register as a shake :D
 

band27

Senior Member
Sep 25, 2008
1,371
1
Toronto
I havnt tried it during driving but im sure braking, steering and accelerating will have no effect although a big and i mean a big bump or bang may just shake the device abit :p

You need a quick, hard shake for it to register as a shake :D

G-forces aren't significant unless you're at Canada's Wonderland on the Bumper Cars ride.....

Nifty Program, Great Job! ...:)
 

PierreDiamond

Member
Oct 6, 2008
30
0
Really a great program! Works like a charm.

One proposal: An exception list for some programs are running would be good (some needs the shake like Shake'n'save) - but especially S2U2 is a problem - because when device is locked with S2U2 - the shake still works - and opens the programs - with some indifferences with S2U2.

Keep up this real good work

Pierre
 

krups

Senior Member
Nov 4, 2008
288
30
Westbrook
G-forces aren't significant unless you're at Canada's Wonderland on the Bumper Cars ride.....

Nifty Program, Great Job! ...:)

Did anyone try this during car use? I mean, there is some g-force involved, in driving... steer, brake, accelerate, bumps... :D

I havnt tried it during driving but im sure braking, steering and accelerating will have no effect although a big and i mean a big bump or bang may just shake the device abit :p

You need a quick, hard shake for it to register as a shake :D

It requires hard shake to detect an event so I don't think it gets an effect of bumps :). Although you can increase threshold to make it even harder.:D
 

krups

Senior Member
Nov 4, 2008
288
30
Westbrook
Really a great program! Works like a charm.

One proposal: An exception list for some programs are running would be good (some needs the shake like Shake'n'save) - but especially S2U2 is a problem - because when device is locked with S2U2 - the shake still works - and opens the programs - with some indifferences with S2U2.

Keep up this real good work

Pierre

Yes I have observed this issue. I am working on exceptions thing, so it could be overridden when S2U2 is in foreground. Will have to wait for some time..:)