From b9b8f5878b9f317b681186b838cd7d4fff77581e Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Thu, 2 Feb 2017 16:28:22 +0100 Subject: [PATCH] wip #1023 @2 --- js/libs/fluidbook/fluidbook.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/js/libs/fluidbook/fluidbook.js b/js/libs/fluidbook/fluidbook.js index 4e2a01b9..cfd4be83 100644 --- a/js/libs/fluidbook/fluidbook.js +++ b/js/libs/fluidbook/fluidbook.js @@ -1298,22 +1298,25 @@ Fluidbook.prototype = { return true; } } + if (this.datas.phonegap == 'android') { if (types_android[type] != undefined) { this.displayLoader(); window.requestFileSystem(LocalFileSystem.TEMPORARY, 0, function (fileSystem) { var dest = fileSystem.root; window.resolveLocalFileSystemURL(url, function (entry) { - entry.copyTo(dest, 'document.pdf', function (copyEntry) { - window.plugins.webintent.startActivity({ - action: window.plugins.webintent.ACTION_VIEW, - type: types_android[type], - url: copyEntry.toURL() - }, function (args) { - $this.hideLoader(5); - }, function (args) { - $this.hideLoader(5); - }); + window.resolveLocalFileSystemURL(cordova.file.externalDataDirectory, function (dirEntry) { + entry.copyTo(dirEntry, 'document.pdf', function (copyEntry) { + window.plugins.webintent.startActivity({ + action: window.plugins.webintent.ACTION_VIEW, + type: types_android[type], + url: copyEntry.toURL() + }, function (args) { + $this.hideLoader(5); + }, function (args) { + $this.hideLoader(5); + }); + }, lazy); }, lazy); }, lazy); }, lazy); -- 2.39.5