Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#7 New api info

closed
None
5
2011-10-22
2009-04-22
No

Ciao,
I have installed and tested the new API with the relative patch using a this syntax like this:

File[] patches = { new File("/dir/to/web_browsers_patch.xml") };

WURFLHolder as = new CustomWURFLHolder( new File("/dir/to/wurfl.xml"), patches );

WURFLManager wurfl = as.getWURFLManager();
String ua = "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)";
Device device = wurfl.getDeviceForRequest(rset.getString(ua));

String model = device.getCapability("model_name");
String family = device.getCapability("brand_name");

wirless = Boolean.parseBoolean(device.getCapability("is_wireless_device"));
if( wirless) {
System.out.println(model);
System.out.println(family);
}

And the result is:
TX
Palm

The same request over http://www.wurflpro.com produce the "No device found" (correctly)

Where i wrong my code?

Grazie mille,
Cristian

Discussion

  • Steve Kamerman
    Steve Kamerman
    2011-10-22

    If this item is still applicable, please use our new support forum at http://www.scientiamobile.com/forum

     
  • Steve Kamerman
    Steve Kamerman
    2011-10-22

    • assigned_to: nobody --> kamermans
    • status: open --> closed