- Posts: 9
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Development and suggestions about third part tool integration.
Cordova, Xamarin, Basic4Android topics are listed here.
Cordova, Xamarin, Basic4Android topics are listed here.
Opening from internal memory
IP: 192.168.0.71
8 years 7 months ago #12666
by JQRL
Opening from internal memory was created by JQRL
Hi, I was wondering how I would open files from internal writable memory
RadaeePDFPlugin.open({
url: cordova.file.dataDirectory+manual.title +".mhs",
password: ''
}
right now this doesn't work for some reason, is there sample code on how to do this
RadaeePDFPlugin.open({
url: cordova.file.dataDirectory+manual.title +".mhs",
password: ''
}
right now this doesn't work for some reason, is there sample code on how to do this
IP: 192.168.0.71
8 years 7 months ago - 8 years 7 months ago #12669
by nermeen
Replied by nermeen on topic Opening from internal memory
Make sure that cordova-plugin-file is installed and loaded correctly, and that you are using cordova.file after the device is ready.
And that you are opening a pdf file (not .mhs)
Code:
document.addEventListener('deviceready', function () {
// Put code here
});
And that you are opening a pdf file (not .mhs)
Code:
url: cordova.file.dataDirectory + "Test.pdf",
Last edit: 8 years 7 months ago by nermeen.
IP: 192.168.0.71
8 years 7 months ago #12672
by JQRL
Replied by JQRL on topic Opening from internal memory
Hi, Currently this line works
window.resolveLocalFileSystemURL("file:///android_asset/www/xxx/yyy.pdf", gotFile, this.presentAlert);
So I'm sure I have the correct path. But
RadaeePDFPlugin.open({
url: "file:///android_asset/www/xxx/yyy.pdf",
password:""
}
does not work. It tells me access denied or invalid path
window.resolveLocalFileSystemURL("file:///android_asset/www/xxx/yyy.pdf", gotFile, this.presentAlert);
So I'm sure I have the correct path. But
RadaeePDFPlugin.open({
url: "file:///android_asset/www/xxx/yyy.pdf",
password:""
}
does not work. It tells me access denied or invalid path
IP: 192.168.0.71
8 years 7 months ago - 8 years 7 months ago #12674
by nermeen
Replied by nermeen on topic Opening from internal memory
To open from assets, please use:
You can check RadaeePDF-Cordova Plugin JS methods
Code:
RadaeePDFPlugin.openFromAssets(
{
url: "Test.PDF", ///www/xxx/yyy.pdf",
password: ""
},
function(message){
console.log("Success: " + message);
},
function(err){
console.log("Failure: " + err);
});
You can check RadaeePDF-Cordova Plugin JS methods
Last edit: 8 years 7 months ago by nermeen.
Time to create page: 0.430 seconds