HTC Incredible (Android Support)

Jun 25, 2010 at 8:34 PM
Edited Jun 25, 2010 at 9:47 PM

HTC Incredible is not providing the platform when this device connects.

Is Mobile Device: True
Manufacturer: HTC
Model: Unknown
Platform: Unknown
Browser: Safari
User Agent: Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; ADR6300 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17

We have about 250k in visits per day and I was wondering if there is a way to change the XML file to support this until it has been added.

Thanks guys, keep up the good work.

Jul 10, 2010 at 2:08 AM
Edited Jul 10, 2010 at 2:10 AM

Since it seems like the keepers of this project aren't in the habit of responding to requests for help...

I ran into the same problem with my HTC Incredible, but (eventually, after a lot of teeth-gnashing and a few bottles of Excedrin) I was able to modify this beast of a file to detect this phone.

First of all, I created a profile for this particular phone based on the Nexus One, since they're pretty similar. Since the user-agent string is very similar to the HTC Dream (which is device model ADR6200; the Incredible is ADR6300), I made this profile inherit from the same parent profile as the Dream (deviceShim_Manufacturer_HTC_seq_13):

  <browser id="deviceShim_Manufacturer_HTC_Device_Incredible_seq_1" parentID="deviceShim_Manufacturer_HTC_seq_13">
      <capability name="_support_mobileDeviceModel" match="^ADR6300$" />
    <capture />
      <capability name="IsMobileDevice" value="true" />
      <capability name="maximumRenderedPageSize" value="131072" />
      <capability name="mobileDeviceModel" value="Incredible" />
      <capability name="platform" value="Android" />
      <capability name="screenPixelsHeight" value="800" />
      <capability name="screenPixelsWidth" value="480" />
      <capability name="SupportsTouchScreen" value="true" />
      <capability name="SupportedFlashVersion" value="Lite 4.0" />
      <capability name="SupportsEmbeddedFlashInWebPages" value="true" />
      <capability name="_support_mobileDeviceModel" value="Incredible" />

Secondly, I modified the parent profile's user-agent detection Regex, since it doesn't account for the "-update1" suffix in the "Android 2.1-update1" part of the user-agent string:

  <browser id="deviceShim_Manufacturer_HTC_seq_13" parentID="deviceShim_Manufacturer_HTC_seq_4">
      <capability name="_support_deviceIdentity" match="(?i)Android \d\.\d[a-zA-Z0-9\-]*; [a-z\-]+;\s(?'DeviceName'A(DR)?[0-9]+)\sBuild/" />
      <capability name="_support_deviceIdentity" match="(?i)Android \d\.\d[a-zA-Z0-9\-]*; [a-z\-]+;\s(?'DeviceName'A(DR)?[0-9]+)\sBuild/" />
      <capability name="mobileDeviceModel" value="${DeviceName}" />
      <capability name="_support_mobileDeviceModel" value="${DeviceName}" />

After making these two changes, my HTC Incredible was properly detected.

Hope this helps... this file is a royal PITA to navigate and make sense of, but you really have to tip your hats to the sheer amount of useful information here and how much effort it must have taken to assemble.