Closed lilici77 closed 5 years ago
Hi! I tried to add an interstitial before open .pdf file. After I close the (interstitital) button I want to appear .pdf file.
Here is my code:
.... else{ initAd(); showInterstitialFunc(); window.resolveLocalFileSystemURL(cordova.file.applicationDirectory + 'www/assets/'+fisier+'.pdf' , function(fileEntry) { window.resolveLocalFileSystemURL(cordova.file.externalDataDirectory, function(dirEntry) { fileEntry.copyTo(dirEntry, 'file.pdf', function(newFileEntry) { cordova.plugins.fileOpener2.open(newFileEntry.nativeURL,'application/pdf', { error : function(e) { alert('Error status: ' + e.status + ' - Error message: ' + e.message); }, success : function () {
} } ); }); }); }); }
You can use the onDismissInterstitialAd event to see when it it closed, then open the pdf.
Hi! I tried to add an interstitial before open .pdf file. After I close the (interstitital) button I want to appear .pdf file.
Here is my code:
.... else{ initAd(); showInterstitialFunc(); window.resolveLocalFileSystemURL(cordova.file.applicationDirectory + 'www/assets/'+fisier+'.pdf' , function(fileEntry) { window.resolveLocalFileSystemURL(cordova.file.externalDataDirectory, function(dirEntry) { fileEntry.copyTo(dirEntry, 'file.pdf', function(newFileEntry) { cordova.plugins.fileOpener2.open(newFileEntry.nativeURL,'application/pdf', { error : function(e) { alert('Error status: ' + e.status + ' - Error message: ' + e.message); }, success : function () {