Thanks for the information. I was also working with getProperty. I'm actually using it on an emulator without any problems. I don't know how long you need to wait for the application so start before you can get the package name. However, I actually add a time.sleep(10) command after the execution of my app just to make sure I give it enough time to start up. With this I'm able to get my correct package.
Another item I noticed. My app was running, but then the wifi prompt came up. This caused the am.current.package property to return an android settings package instead of my application. So I'm wondering if it's basically returning the current application that has focus as the current package. On Jan 21, 10:27 pm, "Hakbong Kim [email protected]" <[email protected]> wrote: > I found out that getproperty() is normally executed not on an emulator > but on a real phone. > > On 1월12일, 오후3시21분, "Hakbong Kim [email protected]" > > <[email protected]> wrote: > >monkeyrunnerAPI said that getProperty('am.current.package') returns > > the Android package name of the currently running package. > > > I found that the function return the current package name only when > > the function immediately follow the execution of an application. > > > I want to know whether that is normal or not. > > > If that is normal, I want to know how soon getProperty() have to be > > called after the execution of an application in order to get a package > > name normally. -- 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

