Guest GunnarKarlsson Posted December 19, 2009 Report Posted December 19, 2009 (edited) Hi I had a few hours available yesterday and threw together an application I think might be useful. Well, I know it will be useful to me, but somebody else might like it too. It is simply a background task that sends a simulated key press to the foreground window when the phone is tilted. Usage: Install the latest Samsung SDK unzip and place the application somewhere on the pda and execute it while holding the phone upright. tilt phone left for left key. tilt phone right for right key. tilt the phone towards you for down and finally... tilt the phone away from you for up key. To quit, place phone with screen facing down. ToDo List Now it just sends the keydown message, keyup might be a good idea too. Haptic feddback A settings application where angles, timings and configurable actions can be set. Gestures instead of just tilting... and much more. This is just the first shot, out in the dark, to see if anyone else might use it. (and to be the first with that application name...) I do not know when I will be able to get more work done, I have a family and all that. ----------------------------------------------------- edit, new version... (002) Usage: Install the latest Samsung SDK unzip and place the application somewhere on the pda and execute. tilt phone left for left key. tilt phone right for right key. tilt the phone towards you for down and finally... tilt the phone away from you for up key. To quit, place phone with screen facing down. I now feel kind of finished with this application, it now fulfills my needs. (to be able to navigate prssreader by David Andrs without the dpad... ;-) ) I have bound the enable script to long press on the "cube-button". I did not do any settings application but I have included some mortscripts to access the settings. The application will stay in background unless the quit script is executed. Some registry keys will be created under HKCU/Software/GK_apps/AccDPad alphaLimit = angle offset from x axis in radiands (for left/right) betaLimit = angle offset fromy axis in radiands (for up/down) waitBetween = how long wait between keypresses in ms (will accelerate the presses if phone is still in the same position) pollTime = poll time for the accelerometer in ms Quit = if "true" then the application will realy quit if phone placed screen down. Enabled = enabled if true, dormant if false... If anyone want to have more functionality, like starting applications or be able to change what kind of keys are pressed, please give feedback in this forum. I feel bad for the dialog box that informs about "API access key" I hope to get the key I got to work, but no luck for now. Maybe their support will be more active after the holidays. Feel free to us this application, on your own risk, should not hurt anything, but do not blame me for dropping the phone while tilting it... Please do not redistribute it. Kind regards //Gunnar /***************************************************************************/ //Edit, New version 003 Added an option to disable vibration, see the init script Added PgUp, PgDown, End, and Home if tilting more than alpha2limit and beta2limit, see the init script. some small changes in the enable script, if process not running it starts the AccDPad.exe (and sends ok to the haptic message box...) And, if anyone is wondering, install Mortscript to run the scripts... superb scripting and basic "on device programming" tool. oh, I almost forgot, the angle is now calculated from the position the application is started in. /***************************************************************************/ //Edit, New version 004 Corrected acceleration bug, now the acceleration effect starts over if phone tilted in another direction Landscape support. the virtual dpad is rotated with the screen. Please do not redistribute it. (if for no other reason than that I want to see how many uses the application, which I can kind of do by seeing how many downloads it gets from this site) /***************************************************************************/ //Edit, New version 005 Cab installation file, installs to \Program Files\AccDPad, just 37k, Setup application AccDPadSetup.exe Toggle application AccDPadToggle.exe, starts AccDPad.exe if not running and toggles enable disabled flag. Got rid of the registration key message. /***************************************************************************/ //Edit, New version 006 Cab installation can install to My storage or Storage Card to /***************************************************************************/ //Edit, New version 007 Bug correction Cab installation: folder depth correction AccDPad: Angle calculated from where application starts/gets enabled Setup program: "AccDPad Start" button does not start new proces if AccDPad.exe already running Added Feature Timeout setting: If phone not tilted for XX seconds, AccDPad is disabled/quits, adjustable in settings. Negative values disables timeout check /***************************************************************************/ //Edit, New version 008 Bug correction Timeout does not prevent application from being started again... sigh, sorry about that one. Added Feature AccDPadToggle should not be necessary anymore, AccDPad checks if another instance of itself is running at start. maybe not a feature, but I puked up some pixels and made some icons... /***************************************************************************/ //Edit, New version 009 Bug correction Better handling of starting a second instance of AccDPad, if process already running it now toggles the enabled state and exits the second instance. New feature Added AccDPadTopBar.exe (and AccDPadTopBarRed.exe). This application places an invisble (or Red) window above battery and volume icons on the top bar. If this area is clicked AccDPad.exe is launched If this area is pressed and hold for more than 1.5s but less than 4s AccDPadSetup.exe is launched If this area is pressed and holded for more than 4s, AccDPadTopBar is exited. For now this small extra application needs the applications to be placed in \My Storage\Program Files\AccDPad\ folder. Suggestion, launch AccDPadTopBarRed.exe to see where you should press and try it out. If you like it, use AccDPadTopBar.exe instead. This is just a test, I dont really know if this is a good way to enable the application, but i thought that since I dont use the small volume or battery icons on the taskbar for anything so why not try it... If this is usable, the location, size, application path etc etc will be configurable of course. Please let me know if this is usable. /***************************************************************************/ //Edit, New version 010 Bug correction Removed spinning cursor when application started. (it will spin during the initiation etc, then it should stop) New feature Added AccDPadNotification.exe This application places an notification icon on the taskbar, press it and select toggle to toggle accdpad on/off. I think this solution has more merit than AccDPadTopBar... Please let me know if the application should be toggled by just pressing the notification icon, this might be faster. /***************************************************************************/ //Edit, New version 012 New feature Enter key is sent if phone moved sharply in any direction, the limit is settable as retLimit in AccDPadSetup zOffLimit, the limit that turns off/disables the AccDPad is settable from AccDPadSetup New test application, this is something I use, and it might be usable for someone else. AccDPadTopBar.exe added to cab. This application shows time/date next to the exit button. If time/date text is pressed quickly, \My Storage\Program files\AccDPad\TopBar_1.lnk shortcut is executed. If time/date text is pressed and held for X vibration the corresponding shortcut is executed etc... (I use this to start task manager, AccDPad etc, feel free to change the shortcuts to something else) Please give feedback, could this be set as v1.0 and leave beta, is it usable? Do anyone use AccDPadNotification? /***************************************************************************/ //Edit, New version 014 New features Added shake2start, enables AccDPad if the phone is shaken sharply for more than 1s (when a long vibration is felt, please place phone in the position you want to use, the long vibration will be preceded by a number of small vibrations during the shake) Added turn2start, enables AccDPad if the phone is held screen down then directly afterwards screen up. (when the long vibration for screen up is felt, please place phone in the position you want to use) To use the new features please select them in AccDPadSetup and save the settings and restart AccDPad The autostart needs the AccDPad process to be active in the background, so when an autostart option is chosen the quit check box is cleared. The process should not take more than 0.1% of the cpu activity, and I have not noticed any effect on battery life but please report your experiences. /***************************************************************************/ //Edit, New version 015 New features Better setup application with setting in degrees Better logic in the setup program (closes AccDPad if saving settings etc...) Bug correction turn2start algorithm improved, do not vibrate all the time. To turn on, if background process is active and turn2start is selected: hold phone screen down for about 1s, turn phone to screen up, then place phone in the position you want to use. A long vibration will signal that the gesture have been recognized. AccDPadNotification: Only starts one instance. /***************************************************************************/ //Edit, New version 016 New features Added back light keep alive. This works in two ways:" 1. The simulated key taps keeps the phone alive, just as you would expect from a real key press on a hardware d-pad, but this still allowed dimming of the "backlight" so... 2. The battery "backlight" timeout is set to one hour when the AccDPad process is enabled and set back to the previous value when disabled. This can be disabled in the setup program. So this means that the "backlight" will not dim whenever AccDPad is enabled, but the device will turn off, according to system settings, if no simulated key presses are sent. Its not the perfect solution but I have no easy way to communicate with the samsung customized "backlight" handler. I put the "" around backlight since it's an AMOLED screen and as such do not have backlight. /***************************************************************************/ //Edit, New version 017 New features AccDPadRotateOrOK.exe, simple application that checks the phone orientation. If it corresponds to the current one used (portrait/landscape etc) it sends OK/Close command, otherwise it rotates the screen to the current orientation. This is meant to be mapped to the OK button. This is just a proof of concept, I find it a bit slow. If anyone likes I think I will make it in native c++ to speed it up a bit. So please give feedback. A small help dialog in AccDPadSetup.exe Bug correction Does not enable AccDPad on activation gesture (shake or turn) if the screen is of. It went active in my pocket while listening to music quite often... /***************************************************************************/ //Edit, New version 018 Arghhh! new version with all dll's included...affected AccDPadNotifcation. Kind regards //GunnarAccDPad.0.001.zipAccDPad.002.zipAccDPad.003.zipAccDPad_004.zipAccDPadCAB.005.CABAccDPadCAB.006.CABAccDPadCAB.007.CABAccDPadCAB.008.CABsmi_wm_std_sdk_redist_2_1_0.cabAccDPadCAB.009.CABAccDPadTopBar.zipAccDPadCAB.010.CABAccDPadCAB.012.CABAccDPadCAB.014.CABAccDPadCAB.015.CABAccDPadCAB.016.CABAccDPadCAB.017.CABAccDPadCAB.018.CAB Edited June 2, 2010 by GunnarKarlsson
Guest iWiNMo Posted December 19, 2009 Report Posted December 19, 2009 This is just the first shot, out in the dark, to see if anyone else might use it. (and to be the first with that application name...) I do not know when I will be able to get more work done, I have a family and all that. Kind regards //Gunnar Cool app for the first post, I'll try it for sure, thanks for sharing it.
Guest bennyx8903 Posted December 19, 2009 Report Posted December 19, 2009 lol sweet, gonna try this with emulators
Guest PCSPhone Posted January 6, 2010 Report Posted January 6, 2010 To avoid the "API access key..." dialog box, use the "AccDPad Enable.mscr" mortscript to launch the application. @Gunnar Is there a way to disable the haptic feedback?
Guest GunnarKarlsson Posted January 8, 2010 Report Posted January 8, 2010 Is there a way to disable the haptic feedback? Now there is... :-) see version 003 above //Gunnar
Guest GunnarKarlsson Posted January 8, 2010 Report Posted January 8, 2010 What do you think about the program? have anyone noticed anything strange, bugs etc? Can it really be the case that it works OK already. //Gunnar
Guest PCSPhone Posted January 8, 2010 Report Posted January 8, 2010 (edited) Thank you! This is a great program for the Omnia II that lacks the dpad. AccDpad is not compatible with googlemap. I can't scroll the map with it. Is it because the simulated dpad action uses the keyboard arrow API? Here are my wish list for v004 :) - Add the ability to simulate the Enter button. For instance the way you would do to hit a drum in Caxixi (pull back the phone). Edited January 8, 2010 by PCSPhone
Guest ryhoo Posted January 10, 2010 Report Posted January 10, 2010 Landscape mode would be very useful for games:)
Guest GunnarKarlsson Posted January 11, 2010 Report Posted January 11, 2010 Landscape mode would be very useful for games:) Landscape mode as in up means left etc when phone rotated 90 deg counter clockwise? //Gunnar
Guest GunnarKarlsson Posted January 11, 2010 Report Posted January 11, 2010 AccDpad is not compatible with googlemap. I can't scroll the map with it. Is it because the simulated dpad action uses the keyboard arrow API? - Add the ability to simulate the Enter button. For instance the way you would do to hit a drum in Caxixi (pull back the phone). Does google earth handle the d-pad on devices that have one? I dont know, but I think it uses the numbers 8,4,6,2 as up, left, right, down. I have to research that. Would a sharp move up be a good "gesture" to activate enter?
Guest PCSPhone Posted January 11, 2010 Report Posted January 11, 2010 Does google earth handle the d-pad on devices that have one? I dont know, but I think it uses the numbers 8,4,6,2 as up, left, right, down. I have to research that. Would a sharp move up be a good "gesture" to activate enter? Yes google map handles the dpad. I tried it on my HTC Touch and it works. IMHO It's more natural to simulate the enter button action by pulling back the phone but if it is too complicated to implement then a sharp move up will do the job.
Guest PCSPhone Posted January 11, 2010 Report Posted January 11, 2010 If I scroll down and the accelerating effect kicks in, scrolling up automatically inherit the accelerating effect. Is it possible to stop this accelerating effect once you change direction?
Guest GunnarKarlsson Posted January 11, 2010 Report Posted January 11, 2010 If I scroll down and the accelerating effect kicks in, scrolling up automatically inherit the accelerating effect. Is it possible to stop this accelerating effect once you change direction? Yes, that is possible. As it is now you must return the phone to rest position to reset the acceleration effect (cool name btw) I have returned my phone for service (The "My Storage" area disappered and no hard reset etc could get it back...) but after it has returned I think will try to implement/correct: 1. Acceleration bug 2. Landscape detection 3. some way to activate enter... 4. Try to see where the key message to google maps fails. //Gunnar
Guest dwallersv Posted January 11, 2010 Report Posted January 11, 2010 Another enhancement to consider: A gesture to "reset" the zero/neutral position. Perhaps a quick tilt back and forth sideways. It would allow you to set the orientation of the phone that is neutral, and then detect tilting let/right/forward/back from there.
Guest PCSPhone Posted January 22, 2010 Report Posted January 22, 2010 Can you add the "disable AccDpad after a period of inactivity" feature?
Guest GunnarKarlsson Posted January 28, 2010 Report Posted January 28, 2010 1. Acceleration bug 2. Landscape detection 3. some way to activate enter... 4. Try to see where the key message to google maps fails. //Gunnar 1 and 2 done, see version 004 in first post. //Gunnar
Guest GunnarKarlsson Posted January 28, 2010 Report Posted January 28, 2010 Can you add the "disable AccDpad after a period of inactivity" feature? I map the enable script to long press on the cube button, that way I can close the application with the same button. What kind of timeout are suggesting 5-10s or minutes? If I implement it it will be adjustable in a registry setting, but I would like to know how this would be used. //Gunnar
Guest PCSPhone Posted January 28, 2010 Report Posted January 28, 2010 I map the enable script to long press on the cube button, that way I can close the application with the same button. What kind of timeout are suggesting 5-10s or minutes? If I implement it it will be adjustable in a registry setting, but I would like to know how this would be used. //Gunnar Sometime I forget to turn it off so it would nice to have it done automaticaly. I would prefer the time to be in second.
Guest GunnarKarlsson Posted February 2, 2010 Report Posted February 2, 2010 (edited) New version 006, see first post. //Gunnar Edited February 2, 2010 by GunnarKarlsson
Guest GunnarKarlsson Posted February 3, 2010 Report Posted February 3, 2010 New version 007 see first post. Sorry about the bugs... //Kind regards Gunnar
Guest ZeroXtreme Posted February 3, 2010 Report Posted February 3, 2010 New version 007 see first post. Sorry about the bugs... //Kind regards Gunnar Hey... no need to apologize about bugs... You are the one actually doing the community a favor, and we all know it is still a work in progress. Keep up the good work ;)
Guest dorinvaida Posted February 4, 2010 Report Posted February 4, 2010 New version 007 see first post. Sorry about the bugs... //Kind regards Gunnar Hi GunnarKarlssoon, Can you post also samsung SDK or link fo it ? Thank you!
Guest GunnarKarlsson Posted February 4, 2010 Report Posted February 4, 2010 (edited) Can you post also samsung SDK or link fo it ? Sure thing, see first post. //Gunnarsmi_wm_std_sdk_redist_2_1_0.cab Edited February 4, 2010 by GunnarKarlsson
Guest Juan Poh Posted February 10, 2010 Report Posted February 10, 2010 Great work, Gunnar! I would use it daily if I can change the keys to scroll up or down while using mdigger to read news article.
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now