get an exception when click a link in markdown result.
Closed this issue · 1 comments
KynoYang commented
Great library saved my day!
However, when I clicked a link, I got an exception. I have no idea how to prevent or handle it?
Is there any one have the same issue?
E/MessageQueue-JNI﹕ 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:1066)
at android.app.ContextImpl.startActivity(ContextImpl.java:1053)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:311)
at android.text.style.URLSpan.onClick(URLSpan.java:62)
at android.text.method.LinkMovementMethod.onTouchEvent(LinkMovementMethod.java:217)
at android.widget.TextView.onTouchEvent(TextView.java:7733)
at android.view.View.dispatchTouchEvent(View.java:7714)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2216)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1959)
at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2068)
at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1515)
at android.app.Activity.dispatchTouchEvent(Activity.java:2476)
at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2016)
at android.view.View.dispatchPointerEvent(View.java:7894)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:3986)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:3865)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3426)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3476)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3445)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3552)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3453)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3609)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3426)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3476)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3445)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3453)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3426)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5571)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5551)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5522)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:5651)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:138)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:5047)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:806)
at com.android.interna
KynoYang commented
Found the solution.
It's my fault.