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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Stack Overflow by Shivakalyan Pippari
, 1 year ago
Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag.Is this really what you want?
via Stack Overflow by Paul Ruiz
, 2 years ago
Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
via Stack Overflow by Chaitanya Sai
, 2 years ago
Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
via GitHub by eugenkiss
, 2 years ago
Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
via Stack Overflow by user3358306
, 2 years ago
Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
via Stack Overflow by RAJU
, 7 months ago
Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag.Is this really what you want?
at android.app.ContextImpl.startActivity(ContextImpl.java:1341)
at android.app.ContextImpl.startActivity(ContextImpl.java:1328)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:322)
at android.text.style.URLSpan.onClick(URLSpan.java:69)
at android.text.method.LinkMovementMethod.onTouchEvent(LinkMovementMethod.java:217)
at android.widget.TextView.onTouchEvent(TextView.java:8273)
at android.view.View.dispatchTouchEvent(View.java:8511)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2239)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2548)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2395)
at android.support.v7.internal.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60)
at android.view.View.dispatchPointerEvent(View.java:8712)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4536)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4394)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3915)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 3 months ago
57 times, 5 months ago
16 times, 1 year ago
4 times, 1 year ago
Once, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.