Closed ultrasamad closed 8 years ago
Nothing is designed for this in the plugin, but you could try:
var onSuccess = function(data) {
hideSpinner();
// Do something
};
function onError(error) {
hideSpinner();
// Do something
}
showSpinner();
window.cordova.plugins.FileOpener.openFile("http://www.website.com/file.pdf", onSuccess, onError);
with showSpinner
and hideSpinner
, 2 functions that manages the spinner display.
Thanks , I will try it. On Jan 20, 2016 7:05 PM, "Maxime Robert" notifications@github.com wrote:
Nothing is designed for this in the plugin, but you could try:
var onSuccess = function(data) { hideSpinner(); // Do something };function onError(error) { hideSpinner(); // Do something }showSpinner();window.cordova.plugins.FileOpener.openFile("http://www.website.com/file.pdf", onSuccess, onError);
with showSpinner and hideSpinner, 2 functions that manages the spinner display.
— Reply to this email directly or view it on GitHub https://github.com/Smile-SA/cordova-plugin-fileopener/issues/8#issuecomment-173326515 .
That works perfect. I love this plugin
Thanks!
Is there a way of calling a function or showing a loading spinner when the app is downloading the file from a server? Which method should I invoke?