Android的使用意图显示网页 [英] Android Displaying Web Page using Intent

查看:177
本文介绍了Android的使用意图显示网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用低于code显示网页

I am using below code to display web page

Uri uri = Uri.parse("http://myurl");
 Intent intent = new Intent(Intent.ACTION_VIEW, uri);
 startActivity(intent);

但是当我点击后退按钮导航到previous它不加载previous页面,而不是它加载在同一页

but when i click the back button to navigate to previous it is not loading the previous page instead it loads the same page

这情况与某些URL不是所有

This happens with some urls not all

为什么出现这种情况?任何解决方案?

Why does this happens? Any Solution???

推荐答案

您打什么网址?如果您尝试发送用户使用重定向到自方案SEO / AJAX目的,或给用户发送到移动网页的网站,例如Twitter这绝对可以发生。在常规浏览器,它迫使你打回两次连续快速找回原来的页面。同为Android。

What URL are you hitting? This can definitely happen if you try to send users to sites like Twitter that use a redirect-to-self scheme for SEO/AJAX purposes or to send the user to a mobile page. In a regular browser it forces you to hit back twice in rapid succession to get back to the original page. Same for Android.

如果是这里发生了什么解决的办法是,我很害怕,不发送用户到该做和/或有关该问题的违规网站告诉网站管理员页面。

If that is what is happening here the solution is, I'm afraid, to not send users to pages that do that and/or tell the webmasters at the offending sites about the problem.

这篇关于Android的使用意图显示网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆