hi

I am extending the ActivityInstrumentationTestCase class to test the
graphics API.
In this case the activity under test is started automatically by the
instrumentation class.

Some activities run continuously until the press of "BACK" key
manually. I want to automate this sending of BACK key.I tried the
following method to call the finish() of activity.

First i got the activity by calling getActivity() function and then
called the finish() of that activity, but still the activity continues
to run.

Can anyone suggest a method by which i can close the Activity.?

Any help would be greatly appreciated.
Thanks in advance

Sachin.


On May 12, 10:58 pm, "Mark Murphy" <[email protected]> wrote:
> > Are there api to support go tobackProgrammatically .. i.e same
> > effect as thebackbutton of the phone.
>
> Calling finish() in your activity has the same general effect as pressing
> thebackbutton.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to