Page 1 of 1

WURFL Cloud API call for User Agent

Posted: Wed Oct 23, 2013 2:54 pm
by tntwurfl
Hello,

I am getting device object from WURFL cloud by making following calls, passing in the request object. I do not want to pass the request object, but only the user agent from the request header to wurfl cloud to get the information about the device. I was looking around in Cloud API, but could not find any such call. What API call do I need to make for this?

CloudClientLoader loader = new CloudClientLoader(TEST_API_KEY,proxy);
manager = loader.getClientManager();
AbstractDevice device = manager.getDeviceFromRequest(req, resp);



Before switching to wurfl cloud, I was using following to get the device info from WURFL data file passing in UA.
WURFLHolder wurflHolder = new CustomWURFLHolder
WURFLManager wurfl = wurflHolder.getWURFLManager();
Device device = wurfl.getDeviceForRequest(uagent);


Thanks

Re: WURFL Cloud API call for User Agent

Posted: Thu Oct 24, 2013 10:37 am
by sriram
Hi tntwurfl,

You are correct in assuming that the "getDeviceForRequest(uagent)" method that you use in the Standalone WURFL Java API does not exist in the WURFL Cloud Java API. However, one way of getting around this is to craft a mock HTTP request with the User-Agent you want to resolve and pass it to the WURFL Cloud API.

Cheers!