Skip to content

Commit

Permalink
[AND-209] Update stream-android-push to v1.3.0. (#1290)
Browse files Browse the repository at this point in the history
* [AND-209] Update stream-android-push to v1.3.0.

* [AND-209] Limit snapshot repo to stream group.

* [AND-209] Remove snapshot dependency on stream-android-chat.

---------

Co-authored-by: PetarVelikov <[email protected]>
Co-authored-by: Aleksandar Apostolov <[email protected]>
  • Loading branch information
3 people authored Jan 23, 2025
1 parent fd4d04f commit 0266410
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,10 @@ object StreamVideoInitHelper {
ensureSingleInstance = false,
notificationConfig = NotificationConfig(
pushDeviceGenerators = listOf(
FirebasePushDeviceGenerator(providerName = "firebase"),
FirebasePushDeviceGenerator(
context = context,
providerName = "firebase",
),
),
),
tokenProvider = object : TokenProvider {
Expand Down
4 changes: 2 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ itu = "1.7.3"
streamWebRTC = "1.3.6"
streamNoiseCancellation = "1.0.2"
streamResult = "1.3.0"
streamChat = "6.9.0"
streamChat = "6.10.0"
streamLog = "1.3.1"
streamPush = "1.1.8"
streamPush = "1.3.0"

androidxTest = "1.5.2"
androidxTestCore = "1.5.0"
Expand Down
2 changes: 1 addition & 1 deletion stream-video-android-core/consumer-proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -67,5 +67,5 @@
# Prevent R8 from stripping notification-handling classes.
-keep class io.getstream.video.android.core.notifications.internal.VideoPushDelegate { *; }
-keep class io.getstream.android.push.delegate.PushDelegate { *; }
-keep class io.getstream.android.push.delegate.PushDelegateProvider { *; }
-keep class io.getstream.android.push.delegate.AndroidPushDelegateProvider { *; }
-keep class io.getstream.android.push.permissions.PushPermissionsInitializer { *; }
2 changes: 1 addition & 1 deletion stream-video-android-core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

<application>
<provider
android:name="io.getstream.android.push.delegate.PushDelegateProvider"
android:name="io.getstream.android.push.delegate.AndroidPushDelegateProvider"
android:authorities="${applicationId}.io.getstream.android.push"
android:exported="false"
tools:node="merge">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ internal class StreamNotificationManager private constructor(
logger.d { "[registerPushDevice] no args" }
// first get a push device generator that works for this device
notificationConfig.pushDeviceGenerators
.firstOrNull { it.isValidForThisDevice(context) }
.firstOrNull { it.isValidForThisDevice() }
?.let { generator ->
generator.onPushDeviceGeneratorSelected()
generator.asyncGeneratePushDevice { generatedDevice ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@

package io.getstream.video.android.core.notifications.internal

import android.content.Context
import io.getstream.android.push.PushDevice
import io.getstream.android.push.delegate.AndroidPushDelegateProvider
import io.getstream.android.push.delegate.PushDelegate
import io.getstream.android.push.delegate.PushDelegateProvider
import io.getstream.log.taggedLogger
import io.getstream.video.android.core.StreamVideo
import io.getstream.video.android.core.dispatchers.DispatcherProvider
Expand All @@ -31,11 +30,9 @@ import kotlinx.coroutines.launch
/**
* Class used to handle Push Notifications.
*
* It is used by reflection by [PushDelegateProvider] class.
* It is used by reflection by [AndroidPushDelegateProvider] class.
*/
internal class VideoPushDelegate(
context: Context,
) : PushDelegate(context) {
internal class VideoPushDelegate : PushDelegate() {
private val logger by taggedLogger("Call:PushDelegate")
private val DEFAULT_CALL_TEXT = "Unknown caller"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ class RingingApp : Application() {
// Make sure that the provider name is equal to the "Name" of the configuration in Stream Dashboard.
pushDeviceGenerators = listOf(
FirebasePushDeviceGenerator(
context = context,
providerName = "firebase",
),
),
Expand Down

0 comments on commit 0266410

Please sign in to comment.