[TIMOB-2926] Android webview does not recognize Ti variable if url contains querystring data
| GitHub Issue | n/a |
|---|---|
| Type | New Feature |
| Priority | Low |
| Status | Closed |
| Resolution | Invalid |
| Resolution Date | 2020-02-13T14:35:29.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Android |
| Labels | android, feature, querystring, url, webview |
| Reporter | Ralf Pfeiffer |
| Assignee | Ingo Muschenetz |
| Created | 2011-04-15T03:33:06.000+0000 |
| Updated | 2020-02-13T14:35:29.000+0000 |
Description
If you create a webview, and try to pass data to it on the querystring, javascript inside the webview cannot see the Ti or Titanium variable(s).
For example:
var webview = Titanium.UI.createWebView({
// url:'ui/tree/demo2.htm?data=12345', // this does NOT work on
Android, but is fine on iOS url:'ui/tree/demo2.htm', // this works
on Android AND on iOS
top:0,
height:400
});
When the querystring data is include in the url, any attempt to
use Ti.API or Ti.App inside the webview results in an error
message:
ReferenceError: Can't find variable: Titanium
or
ReferenceError: Can't find variable: Ti
Reapplying edits.
Same goes for appending hashes to local URL's. demo.html#hash also results in disappearing of Ti and Titanium variables.
should no longer be an issue