Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
5020379021
Posts: 50
Registered: ‎02-18-2009
My Device: Not Specified
Accepted Solution

How can I identify a handle device browse, plz?

As far as I know, I can identify a client browser by checking request.getHeader("user-Agent"), if the value contains "Blackberry" then I can tell it is a Blackberry device which is now sending request to my server. But what's the case for other handle device, such as iPhone, palm...? Some one suggest that I check request.getHeader("Accept") to see if it contains "wml". But to be frank, it doesn't work for iPhone since safari in iPhone only contains "HTML" in that value. I'm wondering if there is a common (or much better) way or regular expression to implement my requirement? Thanks
Please use plain text.
Developer
jwargo
Posts: 395
Registered: ‎12-18-2008
My Device: BlackBerry Torch 9800
My Carrier: AT&T

Re: How can I identify a handle device browse, plz?

There are scripts out there that can detect mobile devices.

 

http://detectmobilebrowsers.mobi/

 

Please use plain text.
Developer
5020379021
Posts: 50
Registered: ‎02-18-2009
My Device: Not Specified

Re: How can I identify a handle device browse, plz?

Very useful, Thanks a lot!
Please use plain text.
New Developer
moviladetection
Posts: 1
Registered: ‎09-25-2009
My Device: Not Specified

Re: How can I identify a handle device browse, plz?

Hi,


To help people to do mobile device detection we have published two free ways to do device detection: detectFree and Movila Detection proxy.


DetectFree works as a service. You need to add a small JavaScript script in to your website and it checks whether the browser is mobile or not.

 

Movila Detection proxy is a full HTTP proxy which has mobile device detection as a one feature.

 

Link: Mobile device detection

 

Hope this helps.

Please use plain text.
New Developer
magicdesign
Posts: 1
Registered: ‎11-30-2009
My Device: Not Specified

Re: How can I identify a handle device browse, plz?

we use www.handsetdetection.com as we have to customize thew content based on device and screen size. We also report back to our client with mobile analytics.

 

If you want to build your own detection system, you can look into wurfl (but that was time i didnt have to spare at this stage)

Please use plain text.