1 Reply Latest reply on Feb 11, 2013 6:11 AM by Bertrand Delacretaz

    Mobile Device Detecting UserAgent Matching order

    Adnan_N

      I am working on CQ5 mobile template device detection, here are some of the constrains/requirements:

      • We dont have latest version of WURFL DB and neither we can update to latest.
      • Only have two device groups Mobile (smart phones, Tablets) and Desktop

       

      I basically want to verify the order in which device detection happens, as per my understanding it is following order:

       

      1. Look into WURFL database for device
      2. If not found in WURFL database then look for RegEx (/libs/wcm/mobile/wurfl/regex) to match to WURFL device mapping
      3. If not found (in #2) then goto nomatch case
      4. If found (in #2) then match UserAgent (which can be a regex) with defined deviced for the page heirarchy

      Please enlight if this order seems incorrect or incomplete.

       

      Given that this order is correct than if there a way to have it do the UserAgent check in #4 first and dont bother checking the whole WURFL database?

       

      Thanks in advance!

        • 1. Re: Mobile Device Detecting UserAgent Matching order
          Bertrand Delacretaz Adobe Employee

          To map User-Agent strings to device properties, CQ5.5 uses all available OSGi services that implement the

          DeviceSpecsProvider interface, ordered by descending service rankings, as described in the docs.

           

          To disable the wurfl database completely, you can deactivate all existing such services, and provide your own

          custom DeviceSpecsProvider service. Note that with the default CQ5.5 GA config, the RegexpDeviceSpecProvider service is tried first, so if a matching regexp has been defined as explained in the mobile docs (regexp-based user agent matching, the exact query shouldn't be tried.