From 244ce290c57a0eb7f5e0d377737fa2ba8126316e Mon Sep 17 00:00:00 2001 From: Tien Nguyen Date: Mon, 15 Jun 2020 14:40:18 +0700 Subject: [PATCH] remove com.google.zxing --- README.md | 10 ++++++---- build.gradle | 5 +++++ package.json | 8 ++++---- plugin.xml | 19 ++++++++----------- tests/plugin.xml | 4 ++-- 5 files changed, 25 insertions(+), 21 deletions(-) create mode 100644 build.gradle diff --git a/README.md b/README.md index 773f89dd9..7326e8b25 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ -# cordova-plugin-facebook4 +# cordova-plugin-facebook4-no-zxing2 -> Use Facebook SDK in Cordova projects +This is a fork from [jeduan/cordova-plugin-facebook4](https://github.com/jeduan/cordova-plugin-facebook4), where i excluded the `com.google.zxing` package (that is used by facebook sdk for qr scaning) that is causing the issue ["Multiple dex files define Lcom/google/zxing/BarcodeFormat"](https://github.com/phonegap/phonegap-plugin-barcodescanner/issues/535) + +> Use Facebook SDK version 5.7.0 in Cordova projects ## Table of contents @@ -18,7 +20,7 @@ See npm package for versions - https://www.npmjs.com/package/cordova-plugin-face Make sure you've registered your Facebook app with Facebook and have an `APP_ID` [https://developers.facebook.com/apps](https://developers.facebook.com/apps). ```bash -$ cordova plugin add cordova-plugin-facebook4 --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" +$ cordova plugin add cordova-plugin-facebook4-no-zxing2 --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" ``` If you need to change your `APP_ID` after installation, it's recommended that you remove and then re-add the plugin as above. Note that changes to the `APP_ID` value in your `config.xml` file will *not* be propagated to the individual platform builds. @@ -345,7 +347,7 @@ Starting from Facebook SDK v4.34 for both iOS and Android, there is a new way of In order to enable this feature in your cordova app, please set the *FACEBOOK_HYBRID_APP_EVENTS* variable to "true"(default is false): ```bash -$ cordova plugin add cordova-plugin-facebook4 --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable FACEBOOK_HYBRID_APP_EVENTS="true" +$ cordova plugin add cordova-plugin-facebook4-no-zxing2 --save --variable APP_ID="123456789" --variable APP_NAME="myApplication" --variable FACEBOOK_HYBRID_APP_EVENTS="true" ``` Please check [this repo](https://github.com/msencer/fb_hybrid_app_events_sample) for an example app using this feature. diff --git a/build.gradle b/build.gradle new file mode 100644 index 000000000..7e86e09a3 --- /dev/null +++ b/build.gradle @@ -0,0 +1,5 @@ +dependencies { + compile("com.facebook.android:facebook-android-sdk:5.7.0") { + exclude group: 'com.google.zxing' + } +} \ No newline at end of file diff --git a/package.json b/package.json index f6c11f777..b442957ce 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "cordova-plugin-facebook4", - "version": "6.4.0", + "name": "cordova-plugin-facebook4-no-zxing2", + "version": "6.4.1", "description": "Cordova Facebook SDK 4 Plugin", "cordova": { - "id": "cordova-plugin-facebook4", + "id": "cordova-plugin-facebook4-no-zxing2", "platforms": [ "android", "ios", @@ -12,7 +12,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/jeduan/cordova-plugin-facebook4" + "url": "https://github.com/tien271/cordova-plugin-facebook4-no-zxing2" }, "keywords": [ "cordova", diff --git a/plugin.xml b/plugin.xml index da68ccaab..b5f3e48ae 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,26 +1,23 @@ Facebook Connect - This is the official plugin for Facebook in Apache Cordova/PhoneGap! - - The Facebook plugin for Apache Cordova allows you to use the same JavaScript code in your - Cordova application as you use in your web application. + This is a fork from jeduan/cordova-plugin-facebook4, where I excluded the com.google.zxing package (that is used by facebook sdk for qr scaning). - https://github.com/jeduan/cordova-plugin-facebook4 + https://github.com/tien271/cordova-plugin-facebook4-no-zxing2 Apache 2.0 - + @@ -70,7 +67,7 @@ android:label="@string/fb_app_name" /> - + @@ -166,9 +163,9 @@ - - - + + + diff --git a/tests/plugin.xml b/tests/plugin.xml index 3c6185117..1ed8b5097 100644 --- a/tests/plugin.xml +++ b/tests/plugin.xml @@ -2,8 +2,8 @@ + id="cordova-plugin-facebook4-no-zxing2-tests" + version="6.4.1"> Facebook Connect Tests