I have a c# server that use Httplistener. In header there was userAgent and i used the web service "http://www.wurflws.com/wurflws?ua=" to obtain capabilities for this userAgent. But now it doesn't work. I tried with the cloud (free account) :
Code: Select all
public DeviceInfo getDataByRequest(HttpListenerContext context)
{
var config = new DefaultCloudClientConfig
{
ApiKey = MY_APIKEY;
};
var manager = new CloudClientManager(config);
CloudClientManager.GetDeviceFromUserAgent
// Grab data
var info = manager.GetDeviceInfo(context, new[] { "resolution_width", "resolution_height" });
foreach (KeyValuePair<string, string> pair in info.Capabilities)
{
...
}
return info;
}
Code: Select all
WURFL.WURFLManager wurlfManager;// How initialize
var device = wurlfManager.GetDeviceForRequest(userAgent);
var caps = device.GetCapabilities();
Christophe