Best way to change the default properties of 'generic'

Integrating Tera-WURFL in your applications.

Best way to change the default properties of 'generic'

Postby marcguay » Tue Apr 26, 2011 11:35 am

Hi,

I'm working with a test server that does not have the user agent variable set, so when testing sites here, I'm stuck with the properties of the 'generic' device, which are set to 90px screen width, xhtml_support_level of 1, etc. What would be the best long-term solution to changing these to properties that more accurately match our "generic" mobile device? I'm looking into creating a patch file that looks something like this:

Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<wurfl_patch>
   <devices>
      <device user_agent="" fall_back="root" id="generic">
         <group id="display">
            <capability name="max_image_width" value="320"/>
         <capability name="resolution_width" value="320"/>
         </group>
      </device>
   </devices>
</wurfl_patch>
marcguay
 
Posts: 17
Joined: Mon May 31, 2010 11:42 am

Re: Best way to change the default properties of 'generic'

Postby kamermans » Thu Apr 28, 2011 7:14 pm

This patch file should work just fine. I would give it a name like generic_override.xml and add it to the patch file directive in your TeraWurflConfig.php, then reload the WURFL and your device will be overridden.
Thanks,

Steve Kamerman
Tera-WURFL Author
COO of ScientiaMobile

IMPORTANT ANNOUNCEMENT! Tera-WURFL and WURFL have joined forces! We have launched ScientiaMobile to provide commercial support for our device detection solutions.

Tera-WURFL.com | Device Explorer
kamermans
Site Admin
 
Posts: 323
Joined: Wed Mar 10, 2010 12:06 pm
Location: Fort Worth, TX

Re: Best way to change the default properties of 'generic'

Postby marcguay » Fri Apr 29, 2011 9:20 am

Thanks again Steve.
marcguay
 
Posts: 17
Joined: Mon May 31, 2010 11:42 am


Return to Using Tera-WURFL

Who is online

Users browsing this forum: No registered users and 1 guest

cron