Is there a way to get the absolute path of an image in phonegap asset folder?
I need the absolute path to attach the image in a mail using EmailComposer plugin.
Just in case somebody is still looking for a solution. Now Cordova implements a really easy way to get the current application directory (supported on Android, iOS and BlackBerry 10) :
cordova.file.applicationDirectory
For example, if you want to access an audio file in your res/audio
directory (within your www
), you just have to write that :
cordova.file.applicationDirectory + 'res/audio/my-audio-file.mp3'
Here is the complete documentation