I am developing an application (text voice sync) which requires lot of JSON files. These files contains the text for SONGS. These JSON files will be copied to Documents directory in IOS and in Android it will be copied to SDCARD or Permanent storage. These being huge and expected to change cannot be loaded as part of the application build it self.
Now as part of my code I set
songStore.getProxy().setUrl(documentDir + songName + ".json");
for IOS -- documentDir is set as ../../Documents and all json files are loaded to Document directory (using itunes)
for Android -- documentDir is to fileSystem.root.toURL() = file:///storage/emulated/0/
The applications works pretty well in iPad when I tested it Andriod the songStore is failing to load the JSON file. Code is same and json file and structure are same.
response = songStore.load({
scope: this,
callback: function(records, operation, success){
....}
success in android always show "Failed"
Please help how we access local files as store URL in android.
Thanks and Regards
Sarang
Store URL setting to file:///storage/emulated/0/
Aucun commentaire:
Enregistrer un commentaire