{ "id": "63558", "key": "TIMOB-2926", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2020-02-13T14:35:29.000+0000", "created": "2011-04-15T03:33:06.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "android", "feature", "querystring", "url", "webview" ], "versions": [], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2020-02-13T14:35:29.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

If you create a webview, and try to pass data to it on the\nquerystring, javascript inside the webview cannot see the Ti or\nTitanium variable(s).

\n

For example:

\n

var webview = Titanium.UI.createWebView({

\n

// url:'ui/tree/demo2.htm?data=12345', // this does NOT work on\nAndroid, but is fine on iOS url:'ui/tree/demo2.htm', // this works\non Android AND on iOS
\ntop:0,
\nheight:400
\n});

\n

When the querystring data is include in the url, any attempt to\nuse Ti.API or Ti.App inside the webview results in an error\nmessage:
\nReferenceError: Can't find variable: Titanium
\nor
\nReferenceError: Can't find variable: Ti

{html}", "attachment": [], "flagged": false, "summary": "Android webview does not recognize Ti variable if url contains querystring data", "creator": { "name": "burggraf", "key": "burggraf", "displayName": "Burggraf", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rpfeiffer", "key": "rpfeiffer", "displayName": "Ralf Pfeiffer", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "129728", "author": { "name": "burggraf", "key": "burggraf", "displayName": "Burggraf", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}
\nvar webview = Titanium.UI.createWebView({\n    //url:'ui/tree/demo2.htm?data=12345', // does NOT work on Android, but works on iOS\n    url:'ui/tree/demo2.htm', // works on Android and iOS\n    top:0,\n    height:400\n});\n
{html}", "updateAuthor": { "name": "burggraf", "key": "burggraf", "displayName": "Burggraf", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:33:08.000+0000", "updated": "2011-04-15T03:33:08.000+0000" }, { "id": "129729", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Reapplying edits.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:33:08.000+0000", "updated": "2011-04-15T03:33:08.000+0000" }, { "id": "216489", "author": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "body": "Same goes for appending hashes to local URL's. demo.html#hash also results in disappearing of Ti and Titanium variables.", "updateAuthor": { "name": "timanrebel", "key": "timanrebel", "displayName": "Timan Rebel", "active": true, "timeZone": "Europe/London" }, "created": "2012-08-28T11:22:25.000+0000", "updated": "2012-08-28T11:22:25.000+0000" }, { "id": "454246", "author": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "body": "should no longer be an issue", "updateAuthor": { "name": "topener", "key": "topener", "displayName": "Rene Pot", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-02-13T14:35:29.000+0000", "updated": "2020-02-13T14:35:29.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }