Problem
When 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.
Works on iOS.
Test case
Add the following snippet to the end of a new mobile project and iOS will return MD5 hex string, android won't.
downloadPath = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'KS_nav_ui.png');
var localFile = downloadPath.read();
Ti.API.info(typeof localFile);
localmd5checksum = Ti.Utils.md5HexDigest(localFile);
Ti.API.info(localmd5checksum);
alert(localmd5checksum);
Discussions
http://developer.appcelerator.com/question/122224/verify-file-checksum (11 months old)
The bug might not be with the md5, but with the Ti.File object.
It looks like others have had issues with the File OBject as you point out... any idea/ETA for a fix?
Closing ticket as fixed, if there are any problems, please file a new ticket.