如何检测来自Android手机的请求? [英] How to detect a request come from Android phone?

查看:174
本文介绍了如何检测来自Android手机的请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的ASP.Net应用程序中,我必须检测用户代理程序的请求是来自移动设备还是来自PC.对于Android移动设备,当它处于横向模式时,它将发送以下用户代理:

"Mozilla/5.0(X11; Linux x86_64)AppleWebKit/534.24(KHTML,例如Gecko)Chrome/11.0.696.34 Safari/534.24"

如何将该请求检测为手机请求?请帮助我.

In my ASP.Net Application I have to detect the request by user agent whether its come from Mobile devices or PC. In case of Android mobile, when it is in landscape mode it sends the following user agent:

"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.696.34 Safari/534.24"

How can I detect this request as a Request-from-mobile? Please help me.

推荐答案

问题已解决.发生这种情况是由于仅将浏览器设置为桌面"版本.抱歉打扰您了.
The problem is solved. This is happened due to setting the browser for ‘Desktop’ version only. Sorry for bother you.


这篇关于如何检测来自Android手机的请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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