{ "id": "88820", "key": "AC-3063", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2012-03-28T11:02:38.000+0000", "created": "2012-03-25T23:05:03.000+0000", "labels": [ "android", "blob", "image" ], "versions": [], "issuelinks": [ { "id": "25048", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "106692", "key": "TIMOB-12447", "fields": { "summary": "Android: Cannot convert BLOB image to string using SQL", "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": "High", "id": "2" }, "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false } } } } ], "assignee": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "updated": "2016-03-08T07:48:06.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": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "It's impossible to fetch blob image from database. It fails while trying to convert to string.\r\n\r\nMore info here: http://developer.appcelerator.com/question/133836/sqlite-and-blobs", "attachment": [], "flagged": false, "summary": "Android: blob image fetching fails", "creator": { "name": "jakub.pilimon", "key": "jakub.pilimon", "displayName": "Jakub Pilimon", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "jakub.pilimon", "key": "jakub.pilimon", "displayName": "Jakub Pilimon", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Win 7 64, android emulator with google api 4.0.3, titanium studio 1.8.2", "comment": { "comments": [ { "id": "188629", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello Jakub,\r\n\r\nplease encode your image to base64 in order to store it in sqlite:\r\n\r\nTi.API.info(\"Ti.Utils.base64encode(media): \" + Ti.Utils.base64encode(media));\r\n\r\n\r\nso you will be storing text (which sqlite understand pretty well). Then, when need to use the image, just decode it and should work. \r\n\r\nbest,\r\n\r\nMauro ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-03-26T12:07:05.000+0000", "updated": "2012-03-26T12:07:05.000+0000" }, { "id": "188760", "author": { "name": "jakub.pilimon", "key": "jakub.pilimon", "displayName": "Jakub Pilimon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Sure, I thought about that but te problem is: what to do if we have prepared database that we have to retrieve images from. It works perfectly on IOS.\r\n\r\nMoreover, as far as I can remember decoding gave me an exception: Invalid type of argument\r\nwhen doing sth like that:\r\n\r\nvar encode = Ti.Utils.base64encode(myimage);\r\ndb.execute(\"INSERT INTO Product_Image (id, product_Id, imageData) VALUES ('69', '66', ?)\", encode);\r\nvar decode = db.execute('SELECT imageData FROM Product_Image WHERE id = 69');\r\nvar myimage2 = Ti.Utils.base64decode(decode);\r\n\r\n", "updateAuthor": { "name": "jakub.pilimon", "key": "jakub.pilimon", "displayName": "Jakub Pilimon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-27T00:19:48.000+0000", "updated": "2012-03-27T00:19:48.000+0000" }, { "id": "189021", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Hello,\r\n\r\nthat used to happen in 1.7. Was fixed in 1.8.x line. Try the encoding in the 1.8.x SDK.\r\n\r\nBest,\r\n\r\nMauro", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2012-03-28T11:02:38.000+0000", "updated": "2012-03-28T11:02:38.000+0000" }, { "id": "189104", "author": { "name": "jakub.pilimon", "key": "jakub.pilimon", "displayName": "Jakub Pilimon", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hello,\r\n\r\nAs I said in the first post: it's 1.8.2. Anyway, even if it would work, it does not solve the case. It's still unresolved", "updateAuthor": { "name": "jakub.pilimon", "key": "jakub.pilimon", "displayName": "Jakub Pilimon", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-03-28T22:57:08.000+0000", "updated": "2012-03-28T22:57:08.000+0000" }, { "id": "280972", "author": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "body": "Invalid issue. ", "updateAuthor": { "name": "mpmiranda", "key": "mpmiranda", "displayName": "Mauro Parra-Miranda", "active": true, "timeZone": "America/Mexico_City" }, "created": "2013-11-24T22:18:27.000+0000", "updated": "2013-11-24T22:18:27.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }