Tuesday, November 20, 2012

Re: [android-developers] Re: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag

You're probably using them incorrectly. You should consult with their support

On Monday, November 19, 2012 8:35:44 PM UTC+2, Fran wrote:
On 11/18/2012 12:56 PM, Piren wrote:
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.
I am not sure about what to do, to be honest. There may be when the user clicks on an ad from Admob or Chartboost, the two ad networks I use, but in this case I think I couldn't do nothing since their libraries are closed.

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 received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-d...@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate