Somehow you are using a Context that did not come from your Activity.  Check
to see which Context you are calling startActivity() on, and make sure it is
either an Activity or one that came from it (such as the Context that Dialog
makes around the one you pass to it).

On Mon, Dec 7, 2009 at 6:52 PM, stanlick <[email protected]> wrote:

> I have a TabActivity subclass that attempts to start a new activity
> via a menu item selection in onOptionsItemSelected.  I am receiving
> the following exception which eludes me at the moment!  I'm not sure
> why it thinks I am *not* in an activity!  Any clues?
>
> android.util.AndroidRuntimeException: Calling startActivity() from
> outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK
> flag. Is this really what you want? menu
>
> Peace,
> Scott
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
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, and so won't reply to such e-mails.  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

Reply via email to