From 3511dac4b11f968bb10e767f7ab780c4a69a8a7d Mon Sep 17 00:00:00 2001 From: Aaron Faber Date: Wed, 15 Nov 2017 15:31:54 +0000 Subject: [PATCH 1/4] Added fix to stop support version pulling in alphas --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 2ec207e..daf495b 100644 --- a/plugin.xml +++ b/plugin.xml @@ -31,7 +31,7 @@ - + From 90b620b9218390c59711c15c66f9bf60cd2c729e Mon Sep 17 00:00:00 2001 From: Aaron Faber Date: Mon, 12 Nov 2018 15:14:33 +0000 Subject: [PATCH 2/4] updated android support library version --- plugin.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index daf495b..0c78ef2 100644 --- a/plugin.xml +++ b/plugin.xml @@ -31,7 +31,7 @@ - + From 054d7fa21b8fcca1f1f5fcdd7374741e0818918e Mon Sep 17 00:00:00 2001 From: Aaron Faber Date: Tue, 13 Nov 2018 10:55:11 +0000 Subject: [PATCH 3/4] allowed support library version to be configurable --- plugin.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 0c78ef2..38885f7 100644 --- a/plugin.xml +++ b/plugin.xml @@ -31,7 +31,8 @@ - + + From 636bce54bcd924fe31bac7213b2ff6c2310b72fc Mon Sep 17 00:00:00 2001 From: Aaron Faber Date: Mon, 10 Dec 2018 16:19:54 +0000 Subject: [PATCH 4/4] chore(): updated readme file with new android_support_version variable --- README.md | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 0f64971..b2431da 100644 --- a/README.md +++ b/README.md @@ -17,17 +17,18 @@ Requirements Installation ------------- - cordova plugin add cordova-plugin-file-opener2 - + $ cordova plugin add cordova-plugin-file-opener2 + $ cordova plugin add cordova-plugin-file-opener2 --variable ANDROID_SUPPORT_VERSION={required version} + Usage ------ cordova.plugins.fileOpener2.open( - filePath, - fileMIMEType, + filePath, + fileMIMEType, { - error : function(){ }, - success : function(){ } - } + error : function(){ }, + success : function(){ } + } ); Examples @@ -35,21 +36,21 @@ Examples Open an APK install dialog: cordova.plugins.fileOpener2.open( - '/sdcard/Download/gmail.apk', + '/sdcard/Download/gmail.apk', 'application/vnd.android.package-archive' ); - + Open a PDF document with the default PDF reader and optional callback object: cordova.plugins.fileOpener2.open( '/sdcard/Download/starwars.pdf', // You can also use a Cordova-style file uri: cdvfile://localhost/persistent/Download/starwars.pdf - 'application/pdf', - { - error : function(e) { + 'application/pdf', + { + error : function(e) { console.log('Error status: ' + e.status + ' - Error message: ' + e.message); }, success : function () { - console.log('file opened successfully'); + console.log('file opened successfully'); } } ); @@ -58,13 +59,13 @@ Open a system modal to open PDF document with one of the already installed app a cordova.plugins.fileOpener2.showOpenWithDialog( '/sdcard/Download/starwars.pdf', // You can also use a Cordova-style file uri: cdvfile://localhost/persistent/Download/starwars.pdf - 'application/pdf', - { - error : function(e) { + 'application/pdf', + { + error : function(e) { console.log('Error status: ' + e.status + ' - Error message: ' + e.message); }, success : function () { - console.log('file opened successfully'); + console.log('file opened successfully'); } } ); @@ -102,7 +103,7 @@ Uninstall a package with its id. cordova.plugins.fileOpener2.uninstall('com.zynga.FarmVille2CountryEscape', { error : function(e) { - console.log('Error status: ' + e.status + ' - Error message: ' + e.message); + console.log('Error status: ' + e.status + ' - Error message: ' + e.message); }, success : function() { console.log('Uninstall intent activity started.');