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);