I have progressed this far...... Using "android.test.InstrumentationTestCase" in a unit test and running from a shell could help simulate key press action. Observe:public void sendKeys(int... keys) Sends a series of key events through instrumentation and waits for idle. For instance: sendKeys(KEYCODE_DPAD_LEFT, KEYCODE_DPAD_CENTER).
This is all available on http://code.google.com/android/reference/android/test/InstrumentationTestCase.html My problem now: I do not know how to do unit testing in the Android env. Any clues? Regards On Wed, Oct 22, 2008 at 1:01 PM, hackbod <[EMAIL PROTECTED]> wrote: > > Note that third party apps can't inject input events into other apps. > You can only do this from an app launched from the user's shell (and > so running as the user). > > On Oct 22, 11:25 am, "Declan Shanaghy" <[EMAIL PROTECTED]> wrote: > > The monkey should be able to help here! > http://code.google.com/android/reference/monkey.html > > > > It is configurable but im not sure if it meets your needs 100%. > > You could enhance it, but at the very least you can copy what it does > into > > an app of your own. > > > > Ahhhhh, you just reminded me of good the ole Code Monkey song! > :-Dhttp://www.youtube.com/watch?v=v4Wy7gRGgeA > > > > -----Original Message----- > > From: [email protected] > > > > [mailto:[EMAIL PROTECTED] On Behalf Of BeeScreen > > Sent: Wednesday, October 22, 2008 11:15 AM > > To: Android Developers > > Subject: [android-developers] Simulate key press action. > > > > Hi, > > I am new to Android dev. > > Just been asked to research if I can simulate the key press action. > > Boss wants me to write a program that can press the phone keys instead > > of me > > pressing them. Is this possible in Android. Please point me to any > > clues. > > Thanks in advance. > > > > Regards > > Beescreen > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

