Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Piren  
View profile  
 More options Nov 18 2012, 6:56 am
From: Piren <gpi...@gmail.com>
Date: Sun, 18 Nov 2012 03:56:53 -0800 (PST)
Local: Sun, Nov 18 2012 6:56 am
Subject: Re: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag

It actually says it right there: 3 at android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:236)

The user is clicking a hyperlink in a webview which is attached to the Application Context. Figure out which webview it is, set a webViewClient and override shouldOverrideUrlLoading to open the hyperlink properly.

On Sunday, November 18, 2012 12:23:52 PM UTC+2, Fran wrote:

>  Hi,

> I am getting many reports of crashes with this error condition:

> android.util.AndroidRuntimeException: Calling startActivity() from outside
> of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this
> really what you want?

> The problem is that the reported stack does not made reference to any line
> on my own code:

> 0 android.util.AndroidRuntimeException: Calling startActivity() from
> outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is
> this really what you want?
> 1 at android.app.ContextImpl.startActivity(ContextImpl.java:618)
> 2 at android.content.ContextWrapper.startActivity(ContextWrapper.java:258)
> 3 at
> android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:236)
> 4 at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:331)
> 5 at android.os.Handler.dispatchMessage(Handler.java:99)
> 6 at android.os.Looper.loop(Looper.java:123)
> 7 at android.app.ActivityThread.main(ActivityThread.java:3652)
> 8 at java.lang.reflect.Method.invokeNative(Native Method)
> 9 at java.lang.reflect.Method.invoke(Method.java:507)
> 10 at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java: 839)
> 11 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
> 12 at dalvik.system.NativeStart.main(Native Method)

> So I am having real troubles to find the source of the problem.

> Does anyone have any idea on what methods called from my code may raise
> these kind of errors?

> TIA


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.