开发者

webviewglue nativedestroy view

I am opening the browser at a page from my app, the code for opening the browser is one I have used many times, but in this particular case, the browser never opens.

I keep getting the following messages at the end in logcat:

09-27 15:41:16.624: INFO/ActivityManager(1644): Starting: Intent { act=android.intent.action.VIEW dat=http://www.nyt.com cmp=com.android.browser/.BrowserActiv开发者_开发技巧ity } from pid 9332
09-27 15:41:16.634: WARN/ActivityManager(1644): Duplicate finish request for HistoryRecord{4097ec10 com.test/com.test.MainScreen}
09-27 15:41:16.684: VERBOSE/http(4606): 15326478 main RequestQueue.resetWifiProxy, wifiProxy is null
09-27 15:41:16.684: ERROR/http(4606): RequestQueue.setProxyConfig, wifiProxy is null
09-27 15:41:16.784: DEBUG/webviewglue(4606): nativeDestroy view: 0x562af8

This is a part of a huge app with a native library.

This is the snippet that opens the browser:

String afterSubmitAction = "http://www.nyt.com";

Uri uri = Uri.parse(afterSubmitAction);
startActivity(new Intent(Intent.ACTION_VIEW, uri));
finish();


Your code is working fine at my side.So please check your internet connection.Please run your code on Edge if you are using wifi to check what cause this problem.


I don't know how to add a comment to your post..

What happens if you comment out the finish(); ? If the Browser doesn't close, then it's was because you finished the parent activity.

Try this?

String afterSubmitAction = "http://www.nyt.com";

Uri uri = Uri.parse(afterSubmitAction);
Intent i = new Intent(Intent.ACTION_VIEW, uri);
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(i);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜