I had exactelly the same problem as you. Using that piece of code I could simulate Home and Back key events. Regards,
On 15 fév, 10:52, Sean Hodges <seanhodge...@googlemail.com> wrote: > Well, the two things I can tell you about it is: > > 1) They show exactly how they did it by giving you the source code. > > 2) They don't show you how to programatically send "Menu" or "End > Call" button presses, because it is not possible to simulate those > buttons (as Mark stated already). > > Those hardware buttons are restricted to application developers, you > can't simulate them. You also can't end *any* active call from your > app, which is what the "End Call" button obviously does. The one thing > you can do is make your options menu appear without requiring the menu > button (I've not tested this): > > http://groups.google.com/group/android-developers/browse_thread/threa... > > But this does not involve simulating key presses. > > > > On Mon, Feb 15, 2010 at 9:28 AM, saru <sarucs...@gmail.com> wrote: > > hey, Please tell me > > abouthttp://davanum.wordpress.com/2007/12/19/android-simulate-key-strokes/. > > How they did it > > > On Feb 14, 7:17 pm, Mark Murphy <mmur...@commonsware.com> wrote: > >> saru wrote: > >> > Hey i want to write a program in android to press menu button or end > >> > button or answer button automatically. > > >> You can't, sorry. > > >> -- > >> Mark Murphy (a Commons > >> Guy)http://commonsware.com|http://twitter.com/commonsguy > > >> Android Consulting/App Development:http://commonsware.com/consulting > > > -- > > 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 -- 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