Merge pull request #4504 from vector-im/feature/bma/upgrade_jitsi

Jitsi android-sdk-3.1.0 -> android-sdk-3.10.0
This commit is contained in:
Benoit Marty 2021-11-19 09:27:46 +01:00 committed by GitHub
commit 7d35891b01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 13 additions and 142 deletions

View File

@ -69,9 +69,9 @@ allprojects {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
// Jitsi repo
maven {
url "https://github.com/vector-im/jitsi_libre_maven/raw/main/android-sdk-3.1.0"
url "https://github.com/vector-im/jitsi_libre_maven/raw/main/android-sdk-3.10.0"
// Note: to test Jitsi release you can use a local file like this:
// url "file:///Users/bmarty/workspaces/jitsi_libre_maven/android-sdk-3.1.0"
// url "file:///Users/bmarty/workspaces/jitsi_libre_maven/android-sdk-3.10.0"
}
google()
mavenCentral()

1
changelog.d/4504.misc Normal file
View File

@ -0,0 +1 @@
Upgrade Jitsi lib (and so webrtc) from Jitsi android-sdk-3.1.0 to android-sdk-3.10.0

View File

@ -18,7 +18,7 @@ The generated maven repository is then host in the project https://github.com/ve
Update the script `./tools/jitsi/build_jisti_libs.sh` with the tag of the project `https://github.com/jitsi/jitsi-meet`.
Currently we are building the version with the tag `android-sdk-3.1.0`.
Currently we are building the version with the tag `android-sdk-3.10.0`.
### Run the build script
@ -35,7 +35,7 @@ It will build the Jitsi Meet Android library and put every generated files in th
- Update the file `./build.gradle` to use the previously created local Maven repository. Currently we have this line:
```groovy
url "https://github.com/vector-im/jitsi_libre_maven/raw/master/android-sdk-3.1.0"
url "https://github.com/vector-im/jitsi_libre_maven/raw/master/android-sdk-3.10.0"
```
You can uncomment and update the line starting with `// url "file://...` and comment the line starting with `url`, to test the library using the locally generated Maven repository.
@ -43,13 +43,13 @@ You can uncomment and update the line starting with `// url "file://...` and com
- Update the dependency of the Jitsi Meet library in the file `./vector/build.gradle`. Currently we have this line:
```groovy
implementation('org.jitsi.react:jitsi-meet-sdk:3.1.0')
implementation('org.jitsi.react:jitsi-meet-sdk:3.10.0')
```
- Update the dependency of the WebRTC library in the file `./vector/build.gradle`. Currently we have this line:
```groovy
implementation('com.facebook.react:react-native-webrtc:1.87.3-jitsi-6624067@aar')
implementation('com.facebook.react:react-native-webrtc:1.92.1-jitsi-9093212@aar')
```
- Perform a gradle sync and build the project
@ -74,7 +74,7 @@ If all the tests are passed, you can export the generated Jitsi library to our M
- Update the file `./build.gradle` to use the previously created Maven repository. Currently we have this line:
```groovy
url "https://github.com/vector-im/jitsi_libre_maven/raw/master/android-sdk-3.1.0"
url "https://github.com/vector-im/jitsi_libre_maven/raw/master/android-sdk-3.10.0"
```
- Build the project and perform the sanity tests again.

View File

@ -25,8 +25,8 @@ cd jitsi-meet
# This is commit after version 2.2.2, which does not compile
# git checkout 5a934c071a5cbe64de275a25d0ed62d8193cdd03
# Version android-sdk-3.1.0, commit 7a64bf006ea027b77564d8847570e1ac46ff0ec0
git checkout android-sdk-3.1.0
# Version android-sdk-3.10.0, commit 99e56e229dfa3c490096e37c3e5b76d2a3f23e32
git checkout android-sdk-3.10.0
echo
echo "##################################################"

View File

@ -470,10 +470,10 @@ dependencies {
// WebRTC
// org.webrtc:google-webrtc is for development purposes only
// implementation 'org.webrtc:google-webrtc:1.0.+'
implementation('com.facebook.react:react-native-webrtc:1.87.3-jitsi-6624067@aar')
implementation('com.facebook.react:react-native-webrtc:1.92.1-jitsi-9093212@aar')
// Jitsi
implementation('org.jitsi.react:jitsi-meet-sdk:3.1.0') {
implementation('org.jitsi.react:jitsi-meet-sdk:3.10.0') {
exclude group: 'com.google.firebase'
exclude group: 'com.google.android.gms'
exclude group: 'com.android.installreferrer'

View File

@ -43,7 +43,7 @@
tools:node="remove" />
<!-- Jitsi SDK is now API23+ -->
<uses-sdk tools:overrideLibrary="org.jitsi.meet.sdk,com.oney.WebRTCModule,com.learnium.RNDeviceInfo,com.reactnativecommunity.asyncstorage,com.ocetnik.timer,com.calendarevents,com.reactnativecommunity.netinfo,com.kevinresol.react_native_default_preference,com.rnimmersive,com.corbt.keepawake,com.BV.LinearGradient,com.horcrux.svg" />
<uses-sdk tools:overrideLibrary="org.jitsi.meet.sdk,com.oney.WebRTCModule,com.learnium.RNDeviceInfo,com.reactnativecommunity.asyncstorage,com.ocetnik.timer,com.calendarevents,com.reactnativecommunity.netinfo,com.kevinresol.react_native_default_preference,com.rnimmersive,com.corbt.keepawake,com.BV.LinearGradient,com.horcrux.svg,com.oblador.performance,com.reactnativecommunity.slider,com.brentvatne.react" />
<!-- Adding CAMERA permission prevents Chromebooks to see the application on the PlayStore -->
<!-- Tell that the Camera is not mandatory to install the application -->
@ -424,14 +424,6 @@
<!-- Temporary fix for Android 12. android:exported has to be explicitly set when targeting Android 12
Do it for services coming from dependencies - BEGIN -->
<service
android:name="org.jitsi.meet.sdk.ConnectionService"
android:exported="false"
tools:node="merge" />
<service
android:name="org.jitsi.meet.sdk.JitsiMeetOngoingConferenceService"
android:exported="false"
tools:node="merge" />
<service
android:name="androidx.sharetarget.ChooserTargetServiceCompat"
android:exported="false"

View File

@ -1,51 +0,0 @@
/*
* Copyright (c) 2020 New Vector Ltd
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package im.vector.app.features.popup
import android.app.Activity
import android.view.View
import im.vector.app.R
import im.vector.app.core.glide.GlideApp
import im.vector.app.databinding.AlerterJitsiCallLayoutBinding
import im.vector.app.features.displayname.getBestName
import im.vector.app.features.home.AvatarRenderer
import org.matrix.android.sdk.api.util.MatrixItem
class JitsiCallAlert(uid: String,
override val shouldBeDisplayedIn: ((Activity) -> Boolean) = { true }
) : DefaultVectorAlert(uid, "", "", 0, shouldBeDisplayedIn) {
override val priority = PopupAlertManager.JITSI_CALL_PRIORITY
override val layoutRes = R.layout.alerter_jitsi_call_layout
override var colorAttribute: Int? = R.attr.colorSurface
override val dismissOnClick: Boolean = false
override val isLight: Boolean = true
class ViewBinder(private val matrixItem: MatrixItem?,
private val avatarRenderer: AvatarRenderer,
private val onJoin: () -> Unit) : VectorAlert.ViewBinder {
override fun bind(view: View) {
val views = AlerterJitsiCallLayoutBinding.bind(view)
views.jitsiCallNameView.text = matrixItem?.getBestName()
matrixItem?.let { avatarRenderer.render(it, views.jitsiCallAvatar, GlideApp.with(view.context.applicationContext)) }
views.jitsiCallJoinView.setOnClickListener {
onJoin()
}
}
}
}

View File

@ -44,7 +44,6 @@ class PopupAlertManager @Inject constructor() {
companion object {
const val INCOMING_CALL_PRIORITY = Int.MAX_VALUE
const val JITSI_CALL_PRIORITY = INCOMING_CALL_PRIORITY - 1
}
private var weakCurrentActivity: WeakReference<Activity>? = null

View File

@ -1,70 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:paddingTop="4dp"
android:paddingBottom="4dp"
tools:style="@style/AlertStyle">
<ImageView
android:id="@+id/jitsiCallAvatar"
android:layout_width="40dp"
android:layout_height="40dp"
android:layout_margin="12dp"
android:contentDescription="@string/call_notification_answer"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@sample/user_round_avatars" />
<TextView
android:id="@+id/jitsiCallNameView"
style="@style/Widget.Vector.TextView.Subtitle"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_marginEnd="12dp"
android:ellipsize="end"
android:maxLines="1"
android:textColor="?vctr_content_primary"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/jitsiCallJoinView"
app:layout_constraintStart_toEndOf="@id/jitsiCallAvatar"
app:layout_constraintTop_toTopOf="@id/jitsiCallAvatar"
tools:text="@sample/users.json/data/displayName" />
<TextView
android:id="@+id/jitsiCallKindView"
style="@style/Widget.Vector.TextView.Body"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="3dp"
android:layout_marginEnd="8dp"
android:drawablePadding="4dp"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/call_jitsi_started"
android:textColor="?vctr_content_secondary"
app:layout_constraintEnd_toStartOf="@+id/jitsiCallJoinView"
app:layout_constraintStart_toStartOf="@id/jitsiCallNameView"
app:layout_constraintTop_toBottomOf="@id/jitsiCallNameView" />
<Button
android:id="@+id/jitsiCallJoinView"
style="@style/Widget.Vector.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
android:contentDescription="@string/call_notification_answer"
android:drawableStart="@drawable/ic_call_video_small"
android:padding="8dp"
android:text="@string/join"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>