Open martyzz1 opened 8 years ago
Have spent a bit of time on this, and managed to do the upgrade. As our fork is not easily mergeable to this original, I can't raise a pull request, but wanted to share as it was a little fiddly
diff --git a/opentok-cordova/plugin.xml b/opentok-cordova/plugin.xml index d8a3b42..383f721 100644 --- a/opentok-cordova/plugin.xml +++ b/opentok-cordova/plugin.xml @@ -12,6 +12,7 @@ <keywords>opentok,tokbox</keywords> <platform name="android"> + <framework src="build-extras.gradle" custom="true" type="gradleReference" /> <asset src="www/opentok-cordova.js" target="opentok-cordova.js" /> <source-file src="src/android/pawsquad/OpenTokCordova.java" @@ -28,10 +29,7 @@ </config-file> <!-- copy opentok sdk --> - <source-file src="src/android/libs/opentok-android-sdk-2.7.0.jar" target-dir="libs/" /> - <source-file src="src/android/libs/armeabi/libopentok.so" target-dir="libs/armeabi" /> - <source-file src="src/android/libs/armeabi-v7a/libopentok.so" target-dir="libs/armeabi-v7a" /> - <source-file src="src/android/libs/x86/libopentok.so" target-dir="libs/x86" /> + <source-file src="src/android/libs/opentok-android-sdk-2.8.1.aar" target-dir="libs/" /> <config-file target="config.xml" parent="/*"> <feature name="OpenTokPlugin">
diff --git a/opentok-cordova/src/android/libs/armeabi-v7a/libopentok.so b/opentok-cordova/src/android/libs/armeabi-v7a/libopentok.so deleted file mode 100755 index f5d2b15..0000000 Binary files a/opentok-cordova/src/android/libs/armeabi-v7a/libopentok.so and /dev/null differ diff --git a/opentok-cordova/src/android/libs/armeabi/libopentok.so b/opentok-cordova/src/android/libs/armeabi/libopentok.so deleted file mode 100755 index 8112b9b..0000000 Binary files a/opentok-cordova/src/android/libs/armeabi/libopentok.so and /dev/null differ diff --git a/opentok-cordova/src/android/libs/x86/libopentok.so b/opentok-cordova/src/android/libs/x86/libopentok.so deleted file mode 100755 index c27d174..0000000 Binary files a/opentok-cordova/src/android/libs/x86/libopentok.so and /dev/null
And also Added a new file:-
diff --git a/opentok-cordova/build-extra.gradle b/opentok-cordova/build-extras.gradle new file mode 100644 index 0000000..96c4732 --- /dev/null +++ b/opentok-cordova/build-extras.gradle @@ -0,0 +1,43 @@ +apply plugin: 'com.android.application' + +buildscript { + repositories { + jcenter() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.0.0' + } +} + +allprojects { + repositories { + jcenter() + maven { + url "http://tokbox.bintray.com/maven" + } + } +} + + + +dependencies { + compile fileTree(dir: 'libs', include: ['*.jar']) + compile 'com.opentok.android:opentok-android-sdk:2.8.1+' + compile 'com.android.support:appcompat-v7:23.1.0' + compile 'com.android.support:design:23.0.0' +}
Have spent a bit of time on this, and managed to do the upgrade. As our fork is not easily mergeable to this original, I can't raise a pull request, but wanted to share as it was a little fiddly
And also Added a new file:-