An error is as follows:
Android. Util. AndroidRuntimeException: Calling startActivity () from outside of the an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
. An android app. ContextImpl. StartActivity (ContextImpl. Java: 931)
. An android app. ContextImpl. StartActivity (ContextImpl. Java: 907)
An android. Content. ContextWrapper. StartActivity (ContextWrapper. Java: 379)
An android. Content. ContextWrapper. StartActivity (ContextWrapper. Java: 379)
An android. Text. Style. URLSpan. OnClick (URLSpan. Java: 107)
An android. Text. Method. LinkMovementMethod. OnTouchEvent (LinkMovementMethod. Java: 231)
... An android widget TextView onTouchEvent (TextView. Java: 10172)
An android. View. The view. DispatchTouchEvent (the Java: 12608)
An android. View. ViewGroup. DispatchTransformedTouchEvent (ViewGroup. Java: 3074)
An android. View. ViewGroup. DispatchTouchEvent (ViewGroup. Java: 2747)
An android. View. ViewGroup. DispatchTransformedTouchEvent (ViewGroup. Java: 3074)
An android. View. ViewGroup. DispatchTouchEvent (ViewGroup. Java: 2747)
An android. View. ViewGroup. DispatchTransformedTouchEvent (ViewGroup. Java: 3074)
An android. View. ViewGroup. DispatchTouchEvent (ViewGroup. Java: 2747)
An android. View. ViewGroup. DispatchTransformedTouchEvent (ViewGroup. Java: 3074)
An android. View. ViewGroup. DispatchTouchEvent (ViewGroup. Java: 2747)
An android. View. ViewGroup. DispatchTransformedTouchEvent (ViewGroup. Java: 3074)
An android. View. ViewGroup. DispatchTouchEvent (ViewGroup. Java: 2747)
An android. View. ViewGroup. DispatchTransformedTouchEvent (ViewGroup. Java: 3074)
An android. View. ViewGroup. DispatchTouchEvent (ViewGroup. Java: 2747)
An android. View. ViewGroup. DispatchTransformedTouchEvent (ViewGroup. Java: 3074)
An android. View. ViewGroup. DispatchTouchEvent (ViewGroup. Java: 2747)
An android. View. ViewGroup. DispatchTransformedTouchEvent (ViewGroup. Java: 3074)
An android. View. ViewGroup. DispatchTouchEvent (ViewGroup. Java: 2747)
At com. Android. Internal. Policy. DecorView. SuperDispatchTouchEvent (DecorView. Java: 1019)
At com. Android. Internal. Policy. PhoneWindow. SuperDispatchTouchEvent (PhoneWindow. Java: 1929)
. An android app. Dialog. DispatchTouchEvent (891) Dialog. Java:
At com. Android. Internal. Policy. DecorView. DispatchTouchEvent (DecorView. Java: 967)
An android. View. The view. DispatchPointerEvent (the Java: 12863)
An android. View. ViewRootImpl $ViewPostImeInputStage. ProcessPointerEvent (ViewRootImpl. Java: 5303)
An android. View. ViewRootImpl $ViewPostImeInputStage. OnProcess (ViewRootImpl. Java: 5074)
An android. View. ViewRootImpl $InputStage. Deliver (ViewRootImpl. Java: 4547)
An android. View. ViewRootImpl $InputStage. OnDeliverToNext (ViewRootImpl. Java: 4617)
An android. View. ViewRootImpl $InputStage. Forward (ViewRootImpl. Java: 4575)
An android. View. ViewRootImpl $AsyncInputStage. Forward (ViewRootImpl. Java: 4730)
An android. View. ViewRootImpl $InputStage. Apply (ViewRootImpl. Java: 4583)
An android. View. ViewRootImpl $AsyncInputStage. Apply (ViewRootImpl. Java: 4787)
An android. View. ViewRootImpl $InputStage. Deliver (ViewRootImpl. Java: 4547)
An android. View. ViewRootImpl $InputStage. OnDeliverToNext (ViewRootImpl. Java: 4617)
An android. View. ViewRootImpl $InputStage. Forward (ViewRootImpl. Java: 4575)
An android. View. ViewRootImpl $InputStage. Apply (ViewRootImpl. Java: 4583)
An android. View. ViewRootImpl $InputStage. Deliver (ViewRootImpl. Java: 4547)
An android. View. ViewRootImpl. DeliverInputEvent (ViewRootImpl. Java: 7313)
An android. View. ViewRootImpl. DoProcessInputEvents (ViewRootImpl. Java: 7282)
An android. View. ViewRootImpl. EnqueueInputEvent (ViewRootImpl. Java: 7237)
An android. View. ViewRootImpl $WindowInputEventReceiver. OnInputEvent (ViewRootImpl. Java: 7425)
An android. View. InputEventReceiver. DispatchInputEvent (InputEventReceiver. Java: 196)
An android. OS. MessageQueue. NativePollOnce (Native Method)
An android. OS. MessageQueue. Next (MessageQueue. Java: 330)
. An android OS. Stars. Loop (169). Which Java:
. An android app. ActivityThread. Main (7056) ActivityThread. Java:
The at Java. Lang. Reflect. Method. Invoke (Native Method)
At com. Android. Internal. OS. RuntimeInit $MethodAndArgsCaller. Run (536) RuntimeInit. Java:
At com. Android. Internal. OS. ZygoteInit. Main (ZygoteInit. Java: 876)
Which members of some directions, thank you
CodePudding user response:
Calling startActivity () from outside of the an Activity context requires the FLAG_ACTIVITY_NEW_TASKThis is not to tell you, you are opened an external activity, plus FLAG_ACTIVITY_NEW_TASK logo in the intent
CodePudding user response: