Skip to content

Commit d954c9e

Browse files
authored
Merge pull request #6195 from vector-im/feature/bma/jitsi_5_1_0
Upgrade Jitsi SDK to 6.2.2
2 parents b0a15cd + fbabe50 commit d954c9e

File tree

19 files changed

+174
-24
lines changed

19 files changed

+174
-24
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ allprojects {
9696
}
9797
// Jitsi repo
9898
maven {
99-
url "https://github.com/vector-im/jitsi_libre_maven/raw/main/android-sdk-5.0.2"
99+
url "https://github.com/vector-im/jitsi_libre_maven/raw/main/android-sdk-6.2.2"
100100
// Note: to test Jitsi release you can use a local file like this:
101-
// url "file:///Users/bmarty/workspaces/jitsi_libre_maven/android-sdk-3.10.0"
101+
// url "file:///Users/bmarty/workspaces/jitsi_libre_maven/android-sdk-6.2.2"
102102
content {
103103
groups.jitsi.regex.each { includeGroupByRegex it }
104104
groups.jitsi.group.each { includeGroup it }

changelog.d/6195.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Upgrade Jitsi SDK to 6.2.2 and WebRtc to 1.106.1-jitsi-12039821.

docs/jitsi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ url "https://github.com/vector-im/jitsi_libre_maven/raw/master/android-sdk-3.10.
9393

9494
- Build the project and perform the sanity tests again.
9595

96-
- Update the file `/CHANGES.md` to notify about the library upgrade, and create a regular PR for project Element Android.
96+
- Create a PR for project Element Android and add a changelog file `<PR_NUMBER>.misc` to notify about the library upgrade.

tools/jitsi/build_jisti_libs.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,8 @@ export LIBRE_BUILD=true
2525

2626
cd jitsi-meet
2727

28-
# This is commit after version 2.2.2, which does not compile
29-
# git checkout 5a934c071a5cbe64de275a25d0ed62d8193cdd03
30-
31-
# Changelog: https://github.com/jitsi/jitsi-meet-release-notes/blob/master/CHANGELOG-MOBILE-SDKS.md
32-
33-
git checkout android-sdk-5.0.2
28+
# Get the latest version from the changelog: https://github.com/jitsi/jitsi-meet-release-notes/blob/master/CHANGELOG-MOBILE-SDKS.md
29+
git checkout android-sdk-6.2.2
3430

3531
echo
3632
echo "##################################################"

vector-app/src/debug/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<application>
55
<activity android:name="im.vector.app.features.debug.TestLinkifyActivity" />
66
<activity android:name="im.vector.app.features.debug.DebugPermissionActivity" />
7+
<activity android:name="im.vector.app.features.debug.jitsi.DebugJitsiActivity" />
78
<activity android:name="im.vector.app.features.debug.analytics.DebugAnalyticsActivity" />
89
<activity android:name="im.vector.app.features.debug.settings.DebugPrivateSettingsActivity" />
910
<activity android:name="im.vector.app.features.debug.sas.DebugSasEmojiActivity" />

vector-app/src/debug/java/im/vector/app/features/debug/DebugMenuActivity.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import im.vector.app.core.utils.registerForPermissionsResult
3535
import im.vector.app.core.utils.toast
3636
import im.vector.app.features.debug.analytics.DebugAnalyticsActivity
3737
import im.vector.app.features.debug.features.DebugFeaturesSettingsActivity
38+
import im.vector.app.features.debug.jitsi.DebugJitsiActivity
3839
import im.vector.app.features.debug.leak.DebugMemoryLeaksActivity
3940
import im.vector.app.features.debug.sas.DebugSasEmojiActivity
4041
import im.vector.app.features.debug.settings.DebugPrivateSettingsActivity
@@ -121,6 +122,9 @@ class DebugMenuActivity : VectorBaseActivity<ActivityDebugMenuBinding>() {
121122
views.debugPermission.setOnClickListener {
122123
startActivity(Intent(this, DebugPermissionActivity::class.java))
123124
}
125+
views.debugJitsi.setOnClickListener {
126+
startActivity(Intent(this, DebugJitsiActivity::class.java))
127+
}
124128
}
125129

126130
private fun openPrivateSettings() {
@@ -175,7 +179,7 @@ class DebugMenuActivity : VectorBaseActivity<ActivityDebugMenuBinding>() {
175179
.setContentText("Content")
176180
// No effect because it's a group summary notif
177181
.setNumber(33)
178-
.setSmallIcon(R.drawable.ic_status_bar)
182+
.setSmallIcon(R.drawable.ic_notification)
179183
// This provocate the badge issue: no badge for group notification
180184
.setGroup("GroupKey")
181185
.setGroupSummary(true)
@@ -208,7 +212,7 @@ class DebugMenuActivity : VectorBaseActivity<ActivityDebugMenuBinding>() {
208212
// For shortcut on long press on launcher icon
209213
.setBadgeIconType(NotificationCompat.BADGE_ICON_NONE)
210214
.setStyle(messagingStyle1)
211-
.setSmallIcon(R.drawable.ic_status_bar)
215+
.setSmallIcon(R.drawable.ic_notification)
212216
.setGroup("GroupKey")
213217
.build()
214218
)
@@ -220,7 +224,7 @@ class DebugMenuActivity : VectorBaseActivity<ActivityDebugMenuBinding>() {
220224
.setContentTitle("Title 2")
221225
.setContentText("Content 2")
222226
.setStyle(messagingStyle2)
223-
.setSmallIcon(R.drawable.ic_status_bar)
227+
.setSmallIcon(R.drawable.ic_notification)
224228
.setGroup("GroupKey")
225229
.build()
226230
)
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* Copyright (c) 2022 New Vector Ltd
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package im.vector.app.features.debug.jitsi
18+
19+
import android.annotation.SuppressLint
20+
import dagger.hilt.android.AndroidEntryPoint
21+
import im.vector.app.core.platform.VectorBaseActivity
22+
import im.vector.application.databinding.ActivityDebugJitsiBinding
23+
import org.jitsi.meet.sdk.JitsiMeet
24+
25+
@AndroidEntryPoint
26+
class DebugJitsiActivity : VectorBaseActivity<ActivityDebugJitsiBinding>() {
27+
28+
override fun getBinding() = ActivityDebugJitsiBinding.inflate(layoutInflater)
29+
30+
override fun getCoordinatorLayout() = views.coordinatorLayout
31+
32+
@SuppressLint("SetTextI18n")
33+
override fun initUiAndData() {
34+
val isCrashReportingDisabled = JitsiMeet.isCrashReportingDisabled(this)
35+
views.status.text = "Jitsi crash reporting is disabled: $isCrashReportingDisabled"
36+
37+
views.splash.setOnClickListener {
38+
JitsiMeet.showSplashScreen(this)
39+
}
40+
41+
views.dev.setOnClickListener {
42+
JitsiMeet.showDevOptions()
43+
}
44+
}
45+
}
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
android:id="@+id/coordinatorLayout"
5+
android:layout_width="match_parent"
6+
android:layout_height="match_parent"
7+
tools:context="im.vector.app.features.debug.jitsi.DebugJitsiActivity"
8+
tools:ignore="HardcodedText">
9+
10+
<ScrollView
11+
android:layout_width="match_parent"
12+
android:layout_height="wrap_content">
13+
14+
<LinearLayout
15+
android:layout_width="match_parent"
16+
android:layout_height="wrap_content"
17+
android:divider="@drawable/linear_divider"
18+
android:gravity="center_horizontal"
19+
android:orientation="vertical"
20+
android:padding="@dimen/layout_horizontal_margin"
21+
android:showDividers="middle">
22+
23+
<TextView
24+
android:id="@+id/status"
25+
android:layout_width="match_parent"
26+
android:layout_height="wrap_content"
27+
tools:text="Status" />
28+
29+
<Button
30+
android:id="@+id/splash"
31+
android:layout_width="wrap_content"
32+
android:layout_height="wrap_content"
33+
android:text="Splash"
34+
android:textAllCaps="false" />
35+
36+
<Button
37+
android:id="@+id/dev"
38+
android:layout_width="wrap_content"
39+
android:layout_height="wrap_content"
40+
android:text="Dev options"
41+
android:textAllCaps="false" />
42+
43+
</LinearLayout>
44+
45+
</ScrollView>
46+
47+
</androidx.coordinatorlayout.widget.CoordinatorLayout>

vector-app/src/debug/res/layout/activity_debug_menu.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@
186186
android:layout_height="wrap_content"
187187
android:text="Permissions" />
188188

189+
<Button
190+
android:id="@+id/debug_jitsi"
191+
android:layout_width="wrap_content"
192+
android:layout_height="wrap_content"
193+
android:text="Jitsi" />
194+
189195
</LinearLayout>
190196

191197
</ScrollView>

vector/build.gradle

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,10 +246,10 @@ dependencies {
246246
// WebRTC
247247
// org.webrtc:google-webrtc is for development purposes only
248248
// implementation 'org.webrtc:google-webrtc:1.0.+'
249-
implementation('com.facebook.react:react-native-webrtc:1.94.2-jitsi-10227332@aar')
250-
249+
implementation('com.facebook.react:react-native-webrtc:1.106.1-jitsi-12039821@aar')
251250
// Jitsi
252-
api('org.jitsi.react:jitsi-meet-sdk:5.0.2') {
251+
// Note: version is 6.2.0, but built from the tag `android-sdk-6.2.2`.
252+
api('org.jitsi.react:jitsi-meet-sdk:6.2.0') {
253253
exclude group: 'com.google.firebase'
254254
exclude group: 'com.google.android.gms'
255255
exclude group: 'com.android.installreferrer'
@@ -305,6 +305,11 @@ dependencies {
305305
exclude group: "org.jetbrains.kotlinx", module: "kotlinx-coroutines-debug"
306306
}
307307

308+
// Fix issue with Jitsi. Inspired from https://github.com/android/android-test/issues/861#issuecomment-872067868
309+
// Error was lots of `Duplicate class org.checkerframework.common.reflection.qual.MethodVal found in modules jetified-checker-3.1 (org.checkerframework:checker:3.1.1) and jetified-checker-qual-3.12.0 (org.checkerframework:checker-qual:3.12.0)
310+
//noinspection GradleDependency Cannot use latest 3.15.0 since it required min API 26.
311+
implementation "org.checkerframework:checker:3.11.0"
312+
308313
androidTestImplementation libs.androidx.testCore
309314
androidTestImplementation libs.androidx.testRunner
310315
androidTestImplementation libs.androidx.testRules

0 commit comments

Comments
 (0)