如何检测移动设备和平板电脑设备 [英] How Do I Detect Mobile and Tablet device

查看:124
本文介绍了如何检测移动设备和平板电脑设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在我的一个项目中尝试检测用户是否正在使用手机或平板电脑。

以便基于设备我可以重定向用户即将移动用户发送到移动网站并发送



平板电脑用户到桌面网站。



我正在使用51degreemobil免费版但它是免费的Lite版本不提供移动和平板电脑之间的任何检测它将平板电脑视为移动。



另外



我使用了很多在线解决方案,但所有这些都没有用对于Andriod设备

因为用户代理对于Andriod平板电脑和移动设备是相同的。



可能会检测屏幕大小解决这个但我不想要使用这个,因为我需要在客户端实现这个,而t会增加我的页面加载时间。



任何人都可以帮我这个。







谢谢

Hi ,
I am trying in one of my project to detect if a user is using Mobile or Tablet.
so that based on Device I can redirect the User i.e. send mobile user to mobile site and send

Tablet user to desktop site.

I am using 51degreemobil Free version but it's free Lite version is not providing any detection between Mobile and Tablet it treats Tablet as an mobile .

Also

I have used a lot of online solution available but all of then didn't work for Andriod devices
as User agent is same for Andriod Tablet and Mobile device.

Might be detecting screen size solve this but i dont want to use this as i need to implement this on client side and t will increase my page load time.

Can anyone please help me on this.



Thanks

推荐答案

您没有提供相关信息关于可用的在线解决方案。那么,看看SO:

如何检测设备是Android手机还是Android平板电脑? [ ^ ]

确定设备是智能手机还是平板电脑? [ ^ ]

如何检测os或设备类型等系统信息[ ^ ]



注意:
Google [ ^ ]返回约15 000 000结果(在0.48秒内)
You did not provide information about "available online solutions". So, have a look at SO:
How to detect device is Android phone or Android tablet?[^]
Determine if the device is a smartphone or tablet?[^]
How to detect system information like os or device type[^]

Note: Google[^] returns about 15 000 000 results (in 0.48 s)


这篇关于如何检测移动设备和平板电脑设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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