I have to save blob response from a web service to titanium's file system and then play. So that I can use this feature even if I do not have internet connection in my device. This is working fine in iPhone but it's not working in android simulator as well as android device.
This is how I am creating sound. var sound = Titanium.Media.createSound();
then saving it in file system as var file = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory, id + '.mp3');
This is how I am saving the response from web service, and setting it as the URL property of sound.
var media = file.nativePath;
sound.url = media; sound.play();
please don't store file in application data directory .just use externalstoragedirectory
Think you can help? Login to answer this question!