views:

599

answers:

2

I am planning to use Wurfl in a web application in order to distinguish between mobile device and desktop browser. The isMobileBrowser(String userAgent) from net.sourceforge.wurfl.core.utils seems the appropriate function to do that.

Nevertheless looking at the source code of the 1.0.1-rc3 I can see that if the user agent string does not contain the "Tablet" word, it always returns false. I was reading this article http://wurfl.sourceforge.net/newapi/ and I would like to use the fuzzy match that is described there to identify the devices. Could be possible that am I using the wrong function?, if that is the case could you please point me to the right direction?.

Also , do you know where can I find the source code for the 1.0.1-rc4?.

Thanks

A: 

You have to use those capabilities:

if(is_wireless_device=false and device_claims_web_support=true) {
the request is from web browser
}

via

fravelgue
If I use the code you propose I will need something like this: getDeviceForRequest(WURFLRequest request); to get the Device object, and then get and check these two capabilities.I was trying to find a high level method in the wurfl api. The function isMobileBrowser(String userAgent) from net.sourceforge.wurfl.core.utils seems the appropriate but having checked the source code, I found it does not do what I expected.
yeforriak
Sry, i have changed my answer. Yes you have to use those capabilities.
fravelgue
Any idea why the method isMobileBrowser(String userAgent) is there?. Here you can find the javadoc: http://wurfl.sourceforge.net/njava/javadocs/net/sourceforge/wurfl/core/utils/UserAgentUtils.html#isMobileBrowser(java.lang.String) . I am a bit confused about this method.
yeforriak
Sry, but i don´t know why, so it is a internal method. Googling i found msie uses Table for Tablet PC: http://www.zytrax.com/tech/web/msie-history.html
fravelgue
I asked the same question in the wml programming group and I found all the answers I needed :).http://tech.groups.yahoo.com/group/wmlprogramming/message/32344
yeforriak
yes, i saw :-). Welcome to best mobile web community.
fravelgue