[android-developers] Re: Send combination key events
If you just want to launch email, why not use startActivity() ? On Tue, May 12, 2009 at 4:36 PM, Kai Hu leon.k...@gmail.com wrote: Thanks for your help Marco, I tried exactly the same way but it doesn't work. It brings me search box of google and put e in it, instead of launching email using 'search + e' shortcut. On May 11, 2:43 pm, Marco Nelissen marc...@android.com wrote: Use Instrumentation.sendKeySync() to send the key-down and key-up events yourself, e.g. search-down, e-down, e-up, search-up. This should be interpreted by the application in the same way as pressing search+e on the keyboard. On Mon, May 11, 2009 at 2:32 PM, Kai Hu leon.k...@gmail.com wrote: Hi there, I am sending key events using sendKeys() but how could I send combination keys, like Search + e ? Anyone could help me on the issue? Thanks. K --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Send combination key events
Thanks for your help Marco, I tried exactly the same way but it doesn't work. It brings me search box of google and put e in it, instead of launching email using 'search + e' shortcut. On May 11, 2:43 pm, Marco Nelissen marc...@android.com wrote: Use Instrumentation.sendKeySync() to send the key-down and key-up events yourself, e.g. search-down, e-down, e-up, search-up. This should be interpreted by the application in the same way as pressing search+e on the keyboard. On Mon, May 11, 2009 at 2:32 PM, Kai Hu leon.k...@gmail.com wrote: Hi there, I am sending key events using sendKeys() but how could I send combination keys, like Search + e ? Anyone could help me on the issue? Thanks. K --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Send combination key events
Use Instrumentation.sendKeySync() to send the key-down and key-up events yourself, e.g. search-down, e-down, e-up, search-up. This should be interpreted by the application in the same way as pressing search+e on the keyboard. On Mon, May 11, 2009 at 2:32 PM, Kai Hu leon.k...@gmail.com wrote: Hi there, I am sending key events using sendKeys() but how could I send combination keys, like Search + e ? Anyone could help me on the issue? Thanks. K --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---