WURFL Cloud API call for User Agent

Questions about the WURFL Cloud service.
tntwurfl
Posts: 7
Joined: Mon Sep 09, 2013 4:19 pm

WURFL Cloud API call for User Agent

Postby tntwurfl » Wed Oct 23, 2013 2:54 pm

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

sriram
Posts: 161
Joined: Wed Jan 04, 2012 10:01 am

Re: WURFL Cloud API call for User Agent

Postby sriram » Thu Oct 24, 2013 10:37 am

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!
Sriram Sridharan


Who is online

Users browsing this forum: No registered users and 67 guests