Justson / AgentWeb

AgentWeb is a powerful library based on Android WebView.
https://www.jianshu.com/p/fc7909e24178
Apache License 2.0
9.27k stars 1.64k forks source link

当调起高德地图url之后点击导航应该是跳到高德地图app的 但是崩溃了 #45

Closed CallmeJeRrYHo closed 7 years ago

CallmeJeRrYHo commented 7 years ago

http://uri.amap.com/navigation?from=113.377287,23.1269,我的位置&to=113.458607,23.102193,你的位置&via=&mode=car&policy=0&src=mypage&coordinate=gaode&callnative=0 报需要FLAG_ACTIVITY_NEW_TASK,在DefaultDownLoaderImpl 的58行那个intent的哪里 需要这个flag

Justson commented 7 years ago

下载出错还是地图导航出错吗?

Justson commented 7 years ago

方便贴下日志吗?

CallmeJeRrYHo commented 7 years ago

main(1)

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 android.app.ContextImpl.startActivity(ContextImpl.java:682) 2 android.app.ContextImpl.startActivity(ContextImpl.java:669) 3 android.content.ContextWrapper.startActivity(ContextWrapper.java:341) 4 com.just.library.DefaultDownLoaderImpl.onDownloadStart(DefaultDownLoaderImpl.java:40) 5 com.android.webview.chromium.WebViewContentsClientAdapter.onDownloadStart(WebViewContentsClientAdapter.java:1052) 6 org.chromium.android_webview.AwContentsClientCallbackHelper$MyHandler.handleMessage(AwContentsClientCallbackHelper.java:162) 7 android.os.Handler.dispatchMessage(Handler.java:102) 8 android.os.Looper.loop(Looper.java:154) 9 android.app.ActivityThread.main(ActivityThread.java:5528) 10 java.lang.reflect.Method.invoke(Native Method) 11 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:740) 12 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:630)

调起导航的时候报错

drivedreams commented 7 years ago

这么明显的错误

发自网易邮箱大师 在2017年07月04日 09:30,CallmeJeRrYHo 写道: main(1)

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 android.app.ContextImpl.startActivity(ContextImpl.java:682) 2 android.app.ContextImpl.startActivity(ContextImpl.java:669) 3 android.content.ContextWrapper.startActivity(ContextWrapper.java:341) 4 com.just.library.DefaultDownLoaderImpl.onDownloadStart(DefaultDownLoaderImpl.java:40) 5 com.android.webview.chromium.WebViewContentsClientAdapter.onDownloadStart(WebViewContentsClientAdapter.java:1052) 6 org.chromium.android_webview.AwContentsClientCallbackHelper$MyHandler.handleMessage(AwContentsClientCallbackHelper.java:162) 7 android.os.Handler.dispatchMessage(Handler.java:102) 8 android.os.Looper.loop(Looper.java:154) 9 android.app.ActivityThread.main(ActivityThread.java:5528) 10 java.lang.reflect.Method.invoke(Native Method) 11 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:740) 12 com.android.internal.os.ZygoteInit.main(ZygoteInit.java:630)

调起导航的时候报错

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Justson commented 7 years ago

该问题已经修复了 。 应该是调起软件包安装程序出错 !

CallmeJeRrYHo commented 7 years ago

那现在使用compile 'com.just.agentweb:agentweb:1.2.4' 这个就可以了吗?

Justson commented 7 years ago

compile 'com.just.agentweb:agentweb:1.2.5