I have an app that plays hundreds of mp3 files. That’s why I can’t put them into the manifest.
I load them via phonegap file plugin and (see my previous post) and it works.
reader.onload = readSuccess
reader.readAsDataURL(fileBlob)
End Function
Function readSuccess(e)
Audio1.src = this.result
Audio1.load()
Audio1.play()
It loads the file as data uri b64 into the player.
BUT… it doesn’t work on some android phones!!! I have one phone, I can not play mp3 files that are handed over that way.
For example it also doesn’t play this example: Providing HTML5 audio with a base64 encoded Data URI as source
With that phone I can only play mp3 files that are listed in the manifest file.
THAT’S WHY I asked for the manifest folder so that I can read the mp3 from cordova.file.externalRootDirectory (external storage) and save it to somewhere inside the app (same path as files listed in the manifest) so that I can load/play the files like this:
Function bDoor_onclick()
Audio1.src = "mp3/doorDetour.mp3"
Audio1.load()
Audio1.play()
End Function
But for all other visitors. This might be the answer for my original question:
MsgBox window.location.pathname
The following paths should be known as they are decribed all over the internet:
MsgBox cordova.file.dataDirectory
…
'cordova.file.dataDirectory - Persistent and private data storage within the application’s sandbox
’cordova.file.cacheDirectory - The OS may delete these files when the device runs low on storage
’cordova.file.externalApplicationStorageDirectory - Application Space On external storage
’cordova.file.externalDataDirectory - App-specific data files On external storage
’cordova.file.externalCacheDirectory - Application cache On external storage
’cordova.file.externalRootDirectory - External storage (SD card) root