Skip to content

Commit 94b4a76

Browse files
Merge branch 'refs/heads/develop'
2 parents 068ef57 + 9b4ffee commit 94b4a76

File tree

29 files changed

+736
-139
lines changed

29 files changed

+736
-139
lines changed

buildSrc/src/main/kotlin/io/getstream/video/android/Configuration.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ object Configuration {
66
const val minSdk = 24
77
const val majorVersion = 1
88
const val minorVersion = 0
9-
const val patchVersion = 12
9+
const val patchVersion = 13
1010
const val versionName = "$majorVersion.$minorVersion.$patchVersion"
11-
const val versionCode = 36
11+
const val versionCode = 37
1212
const val snapshotVersionName = "$majorVersion.$minorVersion.${patchVersion + 1}-SNAPSHOT"
1313
const val artifactGroup = "io.getstream"
14-
const val streamVideoCallGooglePlayVersion = "1.1.5"
14+
const val streamVideoCallGooglePlayVersion = "1.1.6"
1515
const val streamWebRtcVersionName = "1.1.1"
1616
}

docusaurus/docs/Android/04-ui-components/06-ui-previews.mdx

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@ Now, you can implement your preview composable like the example below:
3333
@Preview
3434
@Composable
3535
private fun CallContentPreview() {
36-
StreamMockUtils.initializeStreamVideo(LocalContext.current)
36+
StreamPreviewDataUtils.initializeStreamVideo(LocalContext.current)
3737
VideoTheme {
3838
CallContent(
39-
modifier = Modifier.background(color = VideoTheme.colors.appBackground),
40-
call = mockCall,
39+
call = previewCall,
4140
)
4241
}
4342
}
@@ -49,29 +48,29 @@ After adding the above example to your project, you'll see the following preview
4948

5049
You should follow the steps below to make your previews work well:
5150

52-
1. Initialize a mock `StreamVideo` with the following method: `StreamMockUtils.initializeStreamVideo`.
51+
1. Initialize a mock `StreamVideo` with the following method: `StreamPreviewDataUtils.initializeStreamVideo`.
5352
2. Wrap your composable with the `VideoTheme`.
5453
3. Use the provided mock instances for Stream Video UI components.
5554

5655
This library provides the following mocks:
5756

58-
- **mockCall**: Mock a `Call` that contains few of mock users.
59-
- **mockParticipant**: Mock a `ParticipantState` instance.
60-
- **mockParticipantList**: Mock a list of `ParticipantState` instances.
61-
- **mockUsers**: Mock a list of `User` instances.
62-
- **mockVideoMediaTrack**: Mock a new `MediaTrack` instance.
57+
- **previewCall**: Mock a `Call` that contains few of mock users.
58+
- **previewParticipant**: Mock a `ParticipantState` instance.
59+
- **previewParticipantsList**: Mock a list of `ParticipantState` instances.
60+
- **previewUsers**: Mock a list of `User` instances.
61+
- **previewVideoMediaTrack**: Mock a new `MediaTrack` instance.
6362

6463
For example, you can build a preview Composable for `ParticipantVideo` as in the example below:
6564

6665
```kotlin
6766
@Preview
6867
@Composable
6968
private fun ParticipantVideoPreview() {
70-
StreamMockUtils.initializeStreamVideo(LocalContext.current)
69+
StreamPreviewDataUtils.initializeStreamVideo(LocalContext.current)
7170
VideoTheme {
7271
ParticipantVideoRenderer(
73-
call = mockCall,
74-
participant = mockParticipant,
72+
call = previewCall,
73+
participant = previewParticipant,
7574
)
7675
}
7776
}

docusaurus/docs/Android/04-ui-components/07-ui-testing.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class ScreenTests {
3535
composable: @Composable () -> Unit
3636
) {
3737
paparazzi.snapshot(name = name) {
38-
StreamMockUtils.initializeStreamVideo(LocalContext.current)
38+
StreamPreviewDataUtils.initializeStreamVideo(LocalContext.current)
3939
CompositionLocalProvider(
4040
LocalInspectionMode provides true,
4141
LocalAvatarPreviewPlaceholder provides
@@ -49,7 +49,7 @@ class ScreenTests {
4949
@Test
5050
fun `snapshot CallContent component`() {
5151
snapshot(name = "CallContent") {
52-
CallContent(call = mockCall)
52+
CallContent(call = previewCall)
5353
}
5454
}
5555

@@ -58,7 +58,7 @@ class ScreenTests {
5858
snapshot(name = "CallLobby") {
5959
CallLobby(
6060
modifier = Modifier.fillMaxWidth(),
61-
call = mockCall
61+
call = previewCall
6262
)
6363
}
6464
}
@@ -70,7 +70,7 @@ Let's break the code down line by line.
7070
First, you should initialize Stream Video SDK with the `initializeStreamVideo()` method. You can learn more about our mock library on [UI Previews](07-ui-previews.mdx).
7171

7272
```kotlin
73-
StreamMockUtils.initializeStreamVideo(LocalContext.current)
73+
StreamPreviewDataUtils.initializeStreamVideo(LocalContext.current)
7474
```
7575

7676
Next, you should enable `LocalInspectionMode` with the `CompositionLocalProvider` and allow Stream UI components to be rendered for the test environment.
@@ -90,7 +90,7 @@ Finally, snapshot Stream Video components or your own Composable functions that
9090
@Test
9191
fun `snapshot CallContent component`() {
9292
snapshot(name = "CallContent") {
93-
CallContent(call = mockCall)
93+
CallContent(call = previewCall)
9494
}
9595
}
9696
```

docusaurus/docs/Android/06-advanced/02-push-notifications/01-overview.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ title: Overview
55

66
Push notifications can be configured to receive updates when the application is closed or on the background, or even app is in a different contextual screen. Stream Video Server sends push notification for Ringing calls and Live calls that are about to start to users that have at least one registered device.
77

8+
Push notifications are sent in the following scenarios:
9+
- you create a call with the `ring` value set to true. In this case, a notification that shows a ringing screen is sent.
10+
- you create a call with the `notify` value set to true. In this case, a regular push notification is sent.
11+
- you haven't answered a call. In this case, a missed call notification is sent (regular push notification).
12+
813
To receive push notifications from Stream Video Server, you'll need to:
914

1015
1. Configure your push notification provider on the [Stream Dashboard](https://dashboard.getstream.io/).

stream-video-android-core/api/stream-video-android-core.api

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public final class io/getstream/video/android/core/CallState {
127127
public final fun getErrors ()Lkotlinx/coroutines/flow/StateFlow;
128128
public final fun getIngress ()Lkotlinx/coroutines/flow/StateFlow;
129129
public final fun getLive ()Lkotlinx/coroutines/flow/StateFlow;
130+
public final fun getLiveDuration ()Lkotlinx/coroutines/flow/StateFlow;
130131
public final fun getLiveDurationInMs ()Lkotlinx/coroutines/flow/StateFlow;
131132
public final fun getLivestream ()Lkotlinx/coroutines/flow/StateFlow;
132133
public final fun getLocalParticipant ()Lkotlinx/coroutines/flow/StateFlow;
@@ -816,12 +817,13 @@ public final class io/getstream/video/android/core/StreamVideoBuilder {
816817
public fun <init> (Landroid/content/Context;Ljava/lang/String;Lio/getstream/video/android/core/GEO;Lio/getstream/video/android/model/User;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lio/getstream/video/android/core/logging/LoggingLevel;Lio/getstream/video/android/core/notifications/NotificationConfig;Lkotlin/jvm/functions/Function1;JZ)V
817818
public fun <init> (Landroid/content/Context;Ljava/lang/String;Lio/getstream/video/android/core/GEO;Lio/getstream/video/android/model/User;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lio/getstream/video/android/core/logging/LoggingLevel;Lio/getstream/video/android/core/notifications/NotificationConfig;Lkotlin/jvm/functions/Function1;JZLjava/lang/String;)V
818819
public fun <init> (Landroid/content/Context;Ljava/lang/String;Lio/getstream/video/android/core/GEO;Lio/getstream/video/android/model/User;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lio/getstream/video/android/core/logging/LoggingLevel;Lio/getstream/video/android/core/notifications/NotificationConfig;Lkotlin/jvm/functions/Function1;JZLjava/lang/String;Z)V
819-
public fun <init> (Landroid/content/Context;Ljava/lang/String;Lio/getstream/video/android/core/GEO;Lio/getstream/video/android/model/User;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lio/getstream/video/android/core/logging/LoggingLevel;Lio/getstream/video/android/core/notifications/NotificationConfig;Lkotlin/jvm/functions/Function1;JZLjava/lang/String;ZLjava/lang/String;)V
820-
public fun <init> (Landroid/content/Context;Ljava/lang/String;Lio/getstream/video/android/core/GEO;Lio/getstream/video/android/model/User;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lio/getstream/video/android/core/logging/LoggingLevel;Lio/getstream/video/android/core/notifications/NotificationConfig;Lkotlin/jvm/functions/Function1;JZLjava/lang/String;ZLjava/lang/String;Lio/getstream/video/android/core/sounds/Sounds;)V
821-
public fun <init> (Landroid/content/Context;Ljava/lang/String;Lio/getstream/video/android/core/GEO;Lio/getstream/video/android/model/User;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lio/getstream/video/android/core/logging/LoggingLevel;Lio/getstream/video/android/core/notifications/NotificationConfig;Lkotlin/jvm/functions/Function1;JZLjava/lang/String;ZLjava/lang/String;Lio/getstream/video/android/core/sounds/Sounds;Z)V
822-
public fun <init> (Landroid/content/Context;Ljava/lang/String;Lio/getstream/video/android/core/GEO;Lio/getstream/video/android/model/User;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lio/getstream/video/android/core/logging/LoggingLevel;Lio/getstream/video/android/core/notifications/NotificationConfig;Lkotlin/jvm/functions/Function1;JZLjava/lang/String;ZLjava/lang/String;Lio/getstream/video/android/core/sounds/Sounds;ZLio/getstream/video/android/core/permission/android/StreamPermissionCheck;)V
823-
public fun <init> (Landroid/content/Context;Ljava/lang/String;Lio/getstream/video/android/core/GEO;Lio/getstream/video/android/model/User;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lio/getstream/video/android/core/logging/LoggingLevel;Lio/getstream/video/android/core/notifications/NotificationConfig;Lkotlin/jvm/functions/Function1;JZLjava/lang/String;ZLjava/lang/String;Lio/getstream/video/android/core/sounds/Sounds;ZLio/getstream/video/android/core/permission/android/StreamPermissionCheck;I)V
824-
public synthetic fun <init> (Landroid/content/Context;Ljava/lang/String;Lio/getstream/video/android/core/GEO;Lio/getstream/video/android/model/User;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lio/getstream/video/android/core/logging/LoggingLevel;Lio/getstream/video/android/core/notifications/NotificationConfig;Lkotlin/jvm/functions/Function1;JZLjava/lang/String;ZLjava/lang/String;Lio/getstream/video/android/core/sounds/Sounds;ZLio/getstream/video/android/core/permission/android/StreamPermissionCheck;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
820+
public fun <init> (Landroid/content/Context;Ljava/lang/String;Lio/getstream/video/android/core/GEO;Lio/getstream/video/android/model/User;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lio/getstream/video/android/core/logging/LoggingLevel;Lio/getstream/video/android/core/notifications/NotificationConfig;Lkotlin/jvm/functions/Function1;JZLjava/lang/String;ZLio/getstream/video/android/core/notifications/internal/service/CallServiceConfig;)V
821+
public fun <init> (Landroid/content/Context;Ljava/lang/String;Lio/getstream/video/android/core/GEO;Lio/getstream/video/android/model/User;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lio/getstream/video/android/core/logging/LoggingLevel;Lio/getstream/video/android/core/notifications/NotificationConfig;Lkotlin/jvm/functions/Function1;JZLjava/lang/String;ZLio/getstream/video/android/core/notifications/internal/service/CallServiceConfig;Ljava/lang/String;)V
822+
public fun <init> (Landroid/content/Context;Ljava/lang/String;Lio/getstream/video/android/core/GEO;Lio/getstream/video/android/model/User;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lio/getstream/video/android/core/logging/LoggingLevel;Lio/getstream/video/android/core/notifications/NotificationConfig;Lkotlin/jvm/functions/Function1;JZLjava/lang/String;ZLio/getstream/video/android/core/notifications/internal/service/CallServiceConfig;Ljava/lang/String;Lio/getstream/video/android/core/sounds/Sounds;)V
823+
public fun <init> (Landroid/content/Context;Ljava/lang/String;Lio/getstream/video/android/core/GEO;Lio/getstream/video/android/model/User;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lio/getstream/video/android/core/logging/LoggingLevel;Lio/getstream/video/android/core/notifications/NotificationConfig;Lkotlin/jvm/functions/Function1;JZLjava/lang/String;ZLio/getstream/video/android/core/notifications/internal/service/CallServiceConfig;Ljava/lang/String;Lio/getstream/video/android/core/sounds/Sounds;Z)V
824+
public fun <init> (Landroid/content/Context;Ljava/lang/String;Lio/getstream/video/android/core/GEO;Lio/getstream/video/android/model/User;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lio/getstream/video/android/core/logging/LoggingLevel;Lio/getstream/video/android/core/notifications/NotificationConfig;Lkotlin/jvm/functions/Function1;JZLjava/lang/String;ZLio/getstream/video/android/core/notifications/internal/service/CallServiceConfig;Ljava/lang/String;Lio/getstream/video/android/core/sounds/Sounds;ZLio/getstream/video/android/core/permission/android/StreamPermissionCheck;)V
825+
public fun <init> (Landroid/content/Context;Ljava/lang/String;Lio/getstream/video/android/core/GEO;Lio/getstream/video/android/model/User;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lio/getstream/video/android/core/logging/LoggingLevel;Lio/getstream/video/android/core/notifications/NotificationConfig;Lkotlin/jvm/functions/Function1;JZLjava/lang/String;ZLio/getstream/video/android/core/notifications/internal/service/CallServiceConfig;Ljava/lang/String;Lio/getstream/video/android/core/sounds/Sounds;ZLio/getstream/video/android/core/permission/android/StreamPermissionCheck;I)V
826+
public synthetic fun <init> (Landroid/content/Context;Ljava/lang/String;Lio/getstream/video/android/core/GEO;Lio/getstream/video/android/model/User;Ljava/lang/String;Lkotlin/jvm/functions/Function2;Lio/getstream/video/android/core/logging/LoggingLevel;Lio/getstream/video/android/core/notifications/NotificationConfig;Lkotlin/jvm/functions/Function1;JZLjava/lang/String;ZLio/getstream/video/android/core/notifications/internal/service/CallServiceConfig;Ljava/lang/String;Lio/getstream/video/android/core/sounds/Sounds;ZLio/getstream/video/android/core/permission/android/StreamPermissionCheck;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
825827
public final fun build ()Lio/getstream/video/android/core/StreamVideo;
826828
}
827829

@@ -4138,6 +4140,7 @@ public class io/getstream/video/android/core/notifications/DefaultNotificationHa
41384140
protected final fun getNotificationManager ()Landroidx/core/app/NotificationManagerCompat;
41394141
public fun getOngoingCallNotification (Ljava/lang/String;Lio/getstream/video/android/model/StreamCallId;)Landroid/app/Notification;
41404142
public fun getRingingCallNotification (Lio/getstream/video/android/core/RingingState;Lio/getstream/video/android/model/StreamCallId;Ljava/lang/String;Z)Landroid/app/Notification;
4143+
public fun getSettingUpCallNotification ()Landroid/app/Notification;
41414144
public fun onLiveCall (Lio/getstream/video/android/model/StreamCallId;Ljava/lang/String;)V
41424145
public fun onMissedCall (Lio/getstream/video/android/model/StreamCallId;Ljava/lang/String;)V
41434146
public fun onNotification (Lio/getstream/video/android/model/StreamCallId;Ljava/lang/String;)V
@@ -4188,6 +4191,7 @@ public abstract interface class io/getstream/video/android/core/notifications/No
41884191
public abstract fun getOngoingCallNotification (Ljava/lang/String;Lio/getstream/video/android/model/StreamCallId;)Landroid/app/Notification;
41894192
public abstract fun getRingingCallNotification (Lio/getstream/video/android/core/RingingState;Lio/getstream/video/android/model/StreamCallId;Ljava/lang/String;Z)Landroid/app/Notification;
41904193
public static synthetic fun getRingingCallNotification$default (Lio/getstream/video/android/core/notifications/NotificationHandler;Lio/getstream/video/android/core/RingingState;Lio/getstream/video/android/model/StreamCallId;Ljava/lang/String;ZILjava/lang/Object;)Landroid/app/Notification;
4194+
public abstract fun getSettingUpCallNotification ()Landroid/app/Notification;
41914195
public abstract fun onLiveCall (Lio/getstream/video/android/model/StreamCallId;Ljava/lang/String;)V
41924196
public abstract fun onMissedCall (Lio/getstream/video/android/model/StreamCallId;Ljava/lang/String;)V
41934197
public abstract fun onNotification (Lio/getstream/video/android/model/StreamCallId;Ljava/lang/String;)V
@@ -4215,6 +4219,29 @@ public final class io/getstream/video/android/core/notifications/internal/receiv
42154219
public fun onReceive (Landroid/content/Context;Landroid/content/Intent;)V
42164220
}
42174221

4222+
public final class io/getstream/video/android/core/notifications/internal/service/CallServiceConfig {
4223+
public fun <init> ()V
4224+
public fun <init> (ZILjava/util/Map;)V
4225+
public synthetic fun <init> (ZILjava/util/Map;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
4226+
public final fun component1 ()Z
4227+
public final fun component2 ()I
4228+
public final fun component3 ()Ljava/util/Map;
4229+
public final fun copy (ZILjava/util/Map;)Lio/getstream/video/android/core/notifications/internal/service/CallServiceConfig;
4230+
public static synthetic fun copy$default (Lio/getstream/video/android/core/notifications/internal/service/CallServiceConfig;ZILjava/util/Map;ILjava/lang/Object;)Lio/getstream/video/android/core/notifications/internal/service/CallServiceConfig;
4231+
public fun equals (Ljava/lang/Object;)Z
4232+
public final fun getAudioUsage ()I
4233+
public final fun getCallServicePerType ()Ljava/util/Map;
4234+
public final fun getRunCallServiceInForeground ()Z
4235+
public fun hashCode ()I
4236+
public fun toString ()Ljava/lang/String;
4237+
}
4238+
4239+
public final class io/getstream/video/android/core/notifications/internal/service/CallServiceConfigKt {
4240+
public static final fun callServiceConfig ()Lio/getstream/video/android/core/notifications/internal/service/CallServiceConfig;
4241+
public static final fun livestreamCallServiceConfig ()Lio/getstream/video/android/core/notifications/internal/service/CallServiceConfig;
4242+
public static final fun livestreamGuestCallServiceConfig ()Lio/getstream/video/android/core/notifications/internal/service/CallServiceConfig;
4243+
}
4244+
42184245
public final class io/getstream/video/android/core/permission/PermissionRequest {
42194246
public fun <init> (Lio/getstream/video/android/core/Call;Lio/getstream/video/android/model/User;Lorg/threeten/bp/OffsetDateTime;Ljava/util/List;Lorg/threeten/bp/OffsetDateTime;Lorg/threeten/bp/OffsetDateTime;)V
42204247
public synthetic fun <init> (Lio/getstream/video/android/core/Call;Lio/getstream/video/android/model/User;Lorg/threeten/bp/OffsetDateTime;Ljava/util/List;Lorg/threeten/bp/OffsetDateTime;Lorg/threeten/bp/OffsetDateTime;ILkotlin/jvm/internal/DefaultConstructorMarker;)V

stream-video-android-core/src/main/AndroidManifest.xml

Lines changed: 28 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,26 @@
3434
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
3535
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
3636

37-
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
37+
<uses-permission android:name="android.permission.VIBRATE" />
38+
39+
<!-- Call service permission -->
3840
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
39-
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />
40-
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION" />
41+
42+
<!-- Optional, if incoming / outgoing calls feature is used -->
43+
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
4144
<uses-permission android:name="android.permission.MANAGE_OWN_CALLS"/>
42-
<uses-permission android:name="android.permission.VIBRATE" />
45+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_PHONE_CALL" />
46+
47+
<!-- If the app is only livestream host -->
48+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MICROPHONE" />
49+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_CAMERA" />
50+
51+
<!-- If the app is only livestream viewer/guest type -->
52+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
53+
54+
<!-- If the calls support screensharing -->
55+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PROJECTION"/>
56+
4357

4458
<application>
4559

@@ -83,5 +97,15 @@
8397

8498
<service android:name=".screenshare.StreamScreenShareService"
8599
android:foregroundServiceType="mediaProjection"/>
100+
101+
<service
102+
android:name=".notifications.internal.service.LivestreamCallService"
103+
android:foregroundServiceType="camera|microphone"
104+
android:exported="false" />
105+
106+
<service
107+
android:name=".notifications.internal.service.LivestreamViewerService"
108+
android:foregroundServiceType="mediaPlayback"
109+
android:exported="false" />
86110
</application>
87111
</manifest>

0 commit comments

Comments
 (0)