Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25462] Android: webview userAgent doesn't change

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2017-11-13T23:54:39.000+0000
Affected Version/sRelease 6.2.2
Fix Version/sRelease 7.0.0
ComponentsAndroid
Labelsn/a
ReporterAminul Islam
AssigneeGary Mathews
Created2017-10-31T18:23:57.000+0000
Updated2018-08-21T13:13:59.000+0000

Description

Hi, I've got a problem with webview on Androids when setting the userAgent. I'm using SDK 6.2.2GA When I set the userAgent it doesn't change. I've tried this in a Samsung S7 (android 7)and HTC M8 (android 6). However, it works on an iPhone. Here is some example code:
var webview = Titanium.UI.createWebView({url:'https://www.whoishostingthis.com/tools/user-agent/',userAgent:'IngelbyApp'});

$.index.add(webview);

$.index.open();

Environment :
Operating System
  Name                        = Mac OS X
  Version                     = 10.13
  Architecture                = 64bit
  # CPUs                      = 4
  Memory                      = 8589934592
Node.js
  Node.js Version             = 6.10.3
  npm Version                 = 3.10.10
Titanium CLI
  CLI Version                 = 5.0.14
Titanium SDK
  SDK Version                 = 6.2.2.GA

Comments

  1. Gary Mathews 2017-10-31

    master: https://github.com/appcelerator/titanium_mobile/pull/9576
  2. Lokesh Choudhary 2017-11-09

    FR Passed. Waiting for merge to get enabled.
  3. Lokesh Choudhary 2017-11-13

    PR merged.
  4. Abir Mukherjee 2017-11-15

    Changes are seen in SDK 7.0.0.v20171114202841.

JSON Source