Applications are not allowed to send input events to other applications. You should add an activity monitor to mock out the contact picker activity, probably returning a canned result. This is better in a lot of ways: it is less work while running the test, lets you completely control the result that is returned, and prevents your instrumentation from breaking due to changes in the contacts UI.
On Mon, Jan 5, 2009 at 3:16 AM, sundar <[email protected]> wrote: > > Hey guys, I was instrumenting my application in which I came across a > scenario... where i need to launch and pick a contact from phone book > contacts application. Here in Instrumentation I was able to launch the > phone book contacts app, but I was not able to select a contact from > it using, > sendKeySync(KeyEvent.KEYCODE_DPAD_CENTER). The phone book contacts > app is not responding to any of the events that I send and also I had > no control on it through instrumentation. > Is this a Android Limitation on Instrumentation? if not, could anyone > suggest me some ways of doing it. > > - Sundar > > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

