Click here to Skip to main content
15,887,267 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
Posted
Comments
sachinDabas 4-Apr-14 13:06pm    
Can anyone please solve this

1 solution

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)
 
Share this answer
 
Comments
sachinDabas 4-Apr-14 13:06pm    
Hi Thank you for your response actually the links you shared is for mobile app code using Andriod api . I am specifically looking for the some code which will work for web application.
I want to run this code on my website home page where it will detect that if a tablet is used donot redirect the user and if a mobile the redirect to mobile site.
Maciej Los 4-Apr-14 14:12pm    
It changes everything! Why don't you describe your issue properly for the first time?
sachinDabas 10-Apr-14 12:51pm    
Hi Maciej,
Apologies for the inconvenience caused to you now you know my question can you please suggest answer?
Maciej Los 10-Apr-14 13:02pm    
No time for apologies and there is no reason for that ;)
I'd suggest you to close this thread (by accepting my answer as a solution /green button/) and post another question. As i mentioned, you need to be more precisely, if want to get exact answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900