设置/更改在Android中更改WebView用户代理 [英] Set/Change changing the WebView user agent in Android

查看:68
本文介绍了设置/更改在Android中更改WebView用户代理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,应该只在我的应用程序中使用WebView,否则我的网站会将用户重定向到一个页面,用户可以从该页面下载我的应用程序.

I have a website which should supposedly only using WebView in my app, otherwise my website redirects the user to a page from where he can download my App.

那么,如何在WebView中更改此UA?

So, how can I change this UA in WebView?

此外,由此可能引起什么问题?

Also, what are the possible issues which can arise from this?

推荐答案

您可以在应用程序中将任何POST参数发送到您的网站.否则,您的网站可以确定正在从其他浏览器进行呼叫.此处是一个示例,可能会有所帮助你.

You can send any POST parameter to your website in your app. Otherwise your website can determines that is calling from other browsers. Here is a sample may help you.

这篇关于设置/更改在Android中更改WebView用户代理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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