Closed jasonmcaffee closed 12 years ago
The simple test you have in your code doesn't work for me after doing an npm install wurfl:
var userAgent = 'Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; O2 Xda 2s;PPC;240x320; PPC; 240x320)'; var deviceInfo = wurfl.get(userAgent); console.log(deviceInfo.model_name); // "Xda IIs"
model_name is undefined.
The returned deviceInfo looks like: {"id":"o2_xdaiis_ver1","user_agent":"Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; O2 Xda 2s;PPC;240x320; PPC; 240x320)","fall_back":"htc_blueangel_ver1","actual_device_root":"true","product_info":{},"wml_ui":{},"chtml_ui":{},"xhtml_ui":{},"ajax":{},"markup":{},"cache":{},"display":{},"image_format":{},"bugs":{},"wta":{},"security":{},"bearer":{},"storage":{},"object_download":{},"drm":{},"streaming":{},"wap_push":{},"j2me":{},"mms":{},"sms":{},"sound_format":{},"flash_lite":{},"css":{},"transcoding":{},"rss":{},"pdf":{},"playback":{},"html_ui":{}}
Hi,
the test dont seem to work as said above.
Thanks! The example was missing the group object "product_info". It has been updated.
The simple test you have in your code doesn't work for me after doing an npm install wurfl:
var userAgent = 'Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; O2 Xda 2s;PPC;240x320; PPC; 240x320)'; var deviceInfo = wurfl.get(userAgent); console.log(deviceInfo.model_name); // "Xda IIs"
model_name is undefined.
The returned deviceInfo looks like: {"id":"o2_xdaiis_ver1","user_agent":"Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; O2 Xda 2s;PPC;240x320; PPC; 240x320)","fall_back":"htc_blueangel_ver1","actual_device_root":"true","product_info":{},"wml_ui":{},"chtml_ui":{},"xhtml_ui":{},"ajax":{},"markup":{},"cache":{},"display":{},"image_format":{},"bugs":{},"wta":{},"security":{},"bearer":{},"storage":{},"object_download":{},"drm":{},"streaming":{},"wap_push":{},"j2me":{},"mms":{},"sms":{},"sound_format":{},"flash_lite":{},"css":{},"transcoding":{},"rss":{},"pdf":{},"playback":{},"html_ui":{}}