Adding a string into the User Agent for Android 6+

Following Enterprise Browser 1.8 - Config.xml UserAgent for Android 6+ running on a new TC75x, I used this user agent as a starting point:

KitKat and higher

<UserAgent value="Mozilla/5.0 (Linux; Android %%AndroidVersion%%; %%DeviceModel%% Build/%%BuildNumber%%) AppleWebKit/%w (KHTML, like Gecko) Version/%e Chrome/%c Mobile Safari/%w MAC=%%MAC%% ESN=%%ESN%%" />

I am adding the word Scanner into the user agent to allow the server to vary the pages, since our application runs across scanners, other mobile devices and desktops.

This is the user agent string I set in Config.xml

<UserAgent  value="Mozilla/5.0 (Linux; Android %%AndroidVersion%%; %%DeviceModel%% Build/%%BuildNumber%%) AppleWebKit/%w (KHTML, like Gecko) Version/%e Chrome/%c Mobile Safari/%w MAC=%%MAC%% ESN=%%ESN%% Scanner" />

The user agent received by the server is:

"Mozilla/5.0 (Linux; Android 6.0.1; TC75x Build/01-16-06.2-MG-00; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/66.0.3359.126 Mobile Safari/537.36 MAC=REDACTED ESN=REDACTED Scanner MAC=REDACTED ESN=REDACTED Scanner"

This didn't happen on the Windows devices.

What is the proper way to add text into the user agent string?

Joydeep Chakraborty
Looks like a bug to me.Please

Looks like a bug to me.Please contact Zebra Official support and get it fixed.

Regards,

Joydeep

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Dan McCabe
I've had a customer report

I've had a customer report this problem too.

I believe the ESN stuff was duplicated in the user agent sent, once for every time there was a call to navigator.userAgent in the js.

Reading it user agent seemed to cause eb to re-append the data.

Dan

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Joydeep Chakraborty
This issue is fixed in EB 2.0

This issue is fixed in EB 2.0.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments