{ "id": "92406", "key": "TIMOB-9282", "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": [], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2013-01-31T23:06:54.000+0000", "created": "2012-05-25T13:26:13.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "parity" ], "versions": [ { "id": "13272", "description": "Release 2.0.1", "name": "Release 2.0.1", "archived": true, "released": true, "releaseDate": "2012-04-16" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-31T22:17:48.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": "h2. Problem\r\n\r\nWhen reading a locally stored file (in both resources directory and a downloaded file in the app data directory), {{Ti.Utils.md5HexDigest()}} should read the blob and return a string, but instead NULL is returned on Android.\r\n\r\nWorks on iOS.\r\n\r\nh2. Test case\r\n\r\nAdd the following snippet to the end of a new mobile project and iOS will return MD5 hex string, android won't.\r\n\r\n{code:lang=javascript|title=app.js}\r\ndownloadPath = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'KS_nav_ui.png');\t\t\r\nvar localFile = downloadPath.read();\r\nTi.API.info(typeof localFile);\r\nlocalmd5checksum = Ti.Utils.md5HexDigest(localFile);\r\nTi.API.info(localmd5checksum);\r\nalert(localmd5checksum);\r\n{code}\r\n\r\nh2. Discussions\r\n\r\nhttp://developer.appcelerator.com/question/122224/verify-file-checksum (11 months old)\r\n\r\n\r\n\r\n\r\n\r\n\r\n", "attachment": [], "flagged": false, "summary": "Android: Utils.md5HexDigest() not reading blob", "creator": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "subtasks": [], "reporter": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "environment": "OS X 10.7.x Ti Studio 2.0 - Android Device 2.3 / 2.2 - IDEOS / Wildfire / Blade - Mobile SDK 2.0.1 ", "comment": { "comments": [ { "id": "196241", "author": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "body": "The bug might not be with the md5, but with the Ti.File object.", "updateAuthor": { "name": "ngupta", "key": "ngupta", "displayName": "Neeraj Gupta", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-05-28T12:03:49.000+0000", "updated": "2012-05-28T12:03:49.000+0000" }, { "id": "209448", "author": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "body": "It looks like others have had issues with the File OBject as you point out... any idea/ETA for a fix? ", "updateAuthor": { "name": "stereoket", "key": "stereoket", "displayName": "Ketan Majmudar", "active": true, "timeZone": "Europe/London" }, "created": "2012-07-25T16:26:18.000+0000", "updated": "2012-07-25T16:26:18.000+0000" }, { "id": "416577", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as fixed, if there are any problems, please file a new ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-31T22:17:48.000+0000", "updated": "2017-03-31T22:17:48.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }