diff options
| -rw-r--r-- | config.xml | 1 | ||||
| -rw-r--r-- | js/index.js | 9 |
2 files changed, 9 insertions, 1 deletions
@@ -62,6 +62,7 @@ --> <gap:plugin name="org.apache.cordova.file-transfer" /> <gap:plugin name="org.apache.cordova.file" /> + <gap:plugin name="org.apache.cordova.device" /> <!-- Define app icon for each platform. --> <icon src="icon.png" /> diff --git a/js/index.js b/js/index.js index 3a5605b..4c8f926 100644 --- a/js/index.js +++ b/js/index.js @@ -94,7 +94,14 @@ function download_pdf(link, id){ fileSystem.root.getFile( filename, {create: true, exclusive: false}, function gotFileEntry(fileEntry){ - var sPath = "/storage/sdcard0" + fileEntry.fullPath; // !!! TODO Unterstützung anderer Geräte + var sPath; + + if(device.platform == "Android"){ + sPath = "/storage/sdcard0" + fileEntry.fullPath; + }else{ + sPath = fileEntry.fullPath; + } + console.log('Pfad: ' + sPath); var fileTransfer = new FileTransfer(); fileEntry.remove(); |
