{ "id": "79556", "key": "TIMOB-5088", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": [ { "id": "15576", "description": "2013 Sprint 16", "name": "2013 Sprint 16", "archived": true, "released": true, "releaseDate": "2013-08-12" }, { "id": "15578", "description": "2013 Sprint 16 API", "name": "2013 Sprint 16 API", "archived": true, "released": true, "releaseDate": "2013-08-12" }, { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-07-30T17:20:02.000+0000", "created": "2011-08-23T14:38:04.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "hard_to_verify", "parity" ], "versions": [ { "id": "11570", "description": "", "name": "Release 1.7.2", "archived": true, "released": true, "releaseDate": "2011-07-21" }, { "id": "13273", "description": "Release 2.0.2", "name": "Release 2.0.2", "archived": false, "released": true, "releaseDate": "2012-05-31" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" }, { "id": "14164", "description": "Release 3.0.2", "name": "Release 3.0.2", "archived": true, "released": true, "releaseDate": "2013-02-19" }, { "id": "14162", "description": "Release 3.1.0", "name": "Release 3.1.0", "archived": true, "released": true, "releaseDate": "2013-04-16" } ], "issuelinks": [ { "id": "30593", "type": { "id": "10002", "name": "Duplicate", "inward": "is duplicated by", "outward": "duplicates" }, "inwardIssue": { "id": "117912", "key": "TIMOB-14748", "fields": { "summary": "Android: WebSQL support for titanium's web view", "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" } }, "priority": { "name": "Low", "id": "4" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2013-10-24T00:17:38.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": "openDatabase does not work in a webView but it does in the Android browser.\r\n\r\nStep 1: create a file called test.html\r\nStep 2: host it\r\nStep 3: run the code below (changing the url to point to test.html)\r\nStep 4: notice that the database is not created\r\nStep 5: use the android browser and go to the same file\r\nStep 6: notice that the database is created successfully\r\n\r\n{code:title=\"app.js\"}\r\nvar win = Ti.UI.createWindow();\r\n\r\nvar webView = Ti.UI.createWebView({\r\n\turl: \"http://192.168.1.137/~jalter/test/test.html\"\r\n});\r\nwin.add(webView);\r\n\r\nwin.open();\r\n\r\n{code}\r\n\r\n{code:title=\"test.html\"}\r\n\r\n\t\r\n\t\tTest\r\n\t\t\r\n\t\r\n\t\r\n\t\t
Nothing yet...
\r\n\t\r\n\r\n{code}\r\n\r\nh4. Associated Helpdesk Ticket\r\nhttp://appc.me/c/APP-323498\r\n\r\nh4. Another customer having the same issue\r\n\r\nI need to use web SQL in a Titanium web View. I've used the following code snippet to test the functionality. This code works fine on iPhone, but it fails on Android. Can you please provide assistance in this regard.\r\n\r\n{code}\r\nvar db = openDatabase('mydb', '1.0', 'my first database', 1024);\r\n\r\ndb.transaction(function (tx) {\r\n tx.executeSql('CREATE TABLE IF NOT EXISTS foo (id unique, text)');\r\n tx.executeSql('INSERT INTO foo (id, text) VALUES (1, \"ABCD\")');\r\n});\r\n\r\ndb.transaction(function (tx) {\r\n tx.executeSql('SELECT * FROM foo', [], function (tx, results) {\r\n var len = results.rows.length, i;\r\n for (i = 0; i < len; i++) {\r\n $(\"#val1\").text(\"Value : \"+results.rows.item(i).text);\r\n }\r\n});\r\n\r\n});\r\n{code}", "attachment": [], "flagged": false, "summary": "Android: webView does not support openDatabase", "creator": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jalter", "key": "jalter", "displayName": "Jon Alter", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "TiSDK 3.1GA\r\nAndroid 4.2, Nexus 4\r\nAndroid Emulator 2.2", "comment": { "comments": [ { "id": "163849", "author": { "name": "chris@binteractive.com", "key": "chris@binteractive.com", "displayName": "Chris Haff", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Here is what needs to happen. I reviewed the source on https://github.com/appcelerator/titanium_mobile/blob/master/android/modules/ui/src/ti/modules/titanium/ui/widget/webview/TiUIWebView.java\r\nand it looks like you are not enabling the database. That would require the addition of settings.setDatabaseEnabled(true); in TiUIWebView.", "updateAuthor": { "name": "chris@binteractive.com", "key": "chris@binteractive.com", "displayName": "Chris Haff", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-24T06:43:36.000+0000", "updated": "2011-08-24T06:43:36.000+0000" }, { "id": "163850", "author": { "name": "chris@binteractive.com", "key": "chris@binteractive.com", "displayName": "Chris Haff", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~dthorp] This is not a feature, it's a bug because it's inconsistent with iOS where this works fine (Haven't tried BB yet). This brakes the promise of Titanium and therefore should be a bug (and IMO of course should be addressed immediately.) :)", "updateAuthor": { "name": "chris@binteractive.com", "key": "chris@binteractive.com", "displayName": "Chris Haff", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-08-24T06:48:59.000+0000", "updated": "2011-08-24T06:48:59.000+0000" }, { "id": "263597", "author": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "body": "master PR: https://github.com/appcelerator/titanium_mobile/pull/4507", "updateAuthor": { "name": "hpham", "key": "hpham", "displayName": "Hieu Pham", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-07-29T05:49:41.000+0000", "updated": "2013-07-29T05:49:41.000+0000" }, { "id": "276518", "author": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Verified the fix. Database is created successfully.\r\nClosing.\r\n\r\nEnvironment:\r\nAppcel Studio : 3.2.0.201310230601\r\nTi SDK : 3.2.0.v20131022171645\r\nMac OSX : 10.8.5\r\nCLI - 3.2.0 with hash 72f7426b4ee6c2d2883c666d5b7e03906a16012f\r\nDevice: Samsung Galaxy S4 running android 4.2.2", "updateAuthor": { "name": "lokeshchdhry", "key": "lokeshchdhry", "displayName": "Lokesh Choudhary", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2013-10-24T00:17:38.000+0000", "updated": "2013-10-24T00:17:38.000+0000" } ], "maxResults": 8, "total": 8, "startAt": 0 } } }