@capgo/capacitor-stream-call 7.1.0 → 7.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -77,8 +77,8 @@ dependencies {
77
77
 
78
78
 
79
79
  // Stream dependencies
80
- implementation("io.getstream:stream-video-android-ui-compose:1.10.0")
81
- implementation("io.getstream:stream-video-android-core:1.10.0")
80
+ implementation("io.getstream:stream-video-android-ui-compose:1.11.1")
81
+ implementation("io.getstream:stream-video-android-core:1.11.1")
82
82
  implementation("io.getstream:stream-android-push:1.3.2")
83
83
  implementation("io.getstream:stream-android-push-firebase:1.3.2")
84
84
 
@@ -13,12 +13,18 @@ class CustomStreamIntentResolver(private val context: Application) : StreamInten
13
13
 
14
14
  private val PENDING_INTENT_FLAG = PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
15
15
 
16
- override fun searchIncomingCallPendingIntent(callId: StreamCallId, notificationId: Int): PendingIntent? {
16
+ override fun searchIncomingCallPendingIntent(callId: StreamCallId, notificationId: Int, payload: Map<String, Any?>): PendingIntent? {
17
17
  val launchIntent = context.packageManager.getLaunchIntentForPackage(context.packageName)?.apply {
18
18
  flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_SINGLE_TOP
19
19
  putExtra(NotificationHandler.INTENT_EXTRA_CALL_CID, callId)
20
20
  action = "io.getstream.video.android.action.INCOMING_CALL"
21
21
 
22
+ } ?: Intent(Intent.ACTION_MAIN).apply {
23
+ setPackage(context.packageName)
24
+ addCategory(Intent.CATEGORY_LAUNCHER)
25
+ flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_SINGLE_TOP
26
+ putExtra(NotificationHandler.INTENT_EXTRA_CALL_CID, callId)
27
+ action = "io.getstream.video.android.action.INCOMING_CALL"
22
28
  }
23
29
 
24
30
  return PendingIntent.getActivity(
@@ -29,7 +35,7 @@ class CustomStreamIntentResolver(private val context: Application) : StreamInten
29
35
  )
30
36
  }
31
37
 
32
- override fun searchOutgoingCallPendingIntent(callId: StreamCallId, notificationId: Int): PendingIntent? {
38
+ override fun searchOutgoingCallPendingIntent(callId: StreamCallId, notificationId: Int, payload: Map<String, Any?>): PendingIntent? {
33
39
  // For outgoing calls, create a specific intent that only opens webview when user taps
34
40
  val launchIntent = context.packageManager.getLaunchIntentForPackage(context.packageName)?.apply {
35
41
  flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TOP or Intent.FLAG_ACTIVITY_SINGLE_TOP
@@ -49,13 +55,13 @@ class CustomStreamIntentResolver(private val context: Application) : StreamInten
49
55
  )
50
56
  }
51
57
 
52
- override fun searchNotificationCallPendingIntent(callId: StreamCallId, notificationId: Int): PendingIntent? =
58
+ override fun searchNotificationCallPendingIntent(callId: StreamCallId, notificationId: Int, payload: Map<String, Any?>): PendingIntent? =
53
59
  searchActivityPendingIntent(Intent(NotificationHandler.ACTION_NOTIFICATION), callId, notificationId)
54
60
 
55
- override fun searchMissedCallPendingIntent(callId: StreamCallId, notificationId: Int): PendingIntent? =
61
+ override fun searchMissedCallPendingIntent(callId: StreamCallId, notificationId: Int, payload: Map<String, Any?>): PendingIntent? =
56
62
  searchActivityPendingIntent(Intent(NotificationHandler.ACTION_MISSED_CALL), callId, notificationId)
57
63
 
58
- override fun getDefaultPendingIntent(): PendingIntent {
64
+ override fun getDefaultPendingIntent(payload: Map<String, Any?>): PendingIntent {
59
65
  val intent = context.packageManager.getLaunchIntentForPackage(context.packageName)
60
66
  ?: Intent(Intent.ACTION_MAIN).apply {
61
67
  setPackage(context.packageName)
@@ -70,10 +76,10 @@ class CustomStreamIntentResolver(private val context: Application) : StreamInten
70
76
  )
71
77
  }
72
78
 
73
- override fun searchLiveCallPendingIntent(callId: StreamCallId, notificationId: Int): PendingIntent? =
79
+ override fun searchLiveCallPendingIntent(callId: StreamCallId, notificationId: Int, payload: Map<String, Any?>): PendingIntent? =
74
80
  searchActivityPendingIntent(Intent(NotificationHandler.ACTION_LIVE_CALL), callId, notificationId)
75
81
 
76
- override fun searchAcceptCallPendingIntent(callId: StreamCallId, notificationId: Int): PendingIntent? {
82
+ override fun searchAcceptCallPendingIntent(callId: StreamCallId, notificationId: Int, payload: Map<String, Any?>): PendingIntent? {
77
83
  val launchIntent = context.packageManager.getLaunchIntentForPackage(context.packageName)?.apply {
78
84
  action = NotificationHandler.ACTION_ACCEPT_CALL
79
85
  putExtra(NotificationHandler.INTENT_EXTRA_CALL_CID, callId)
@@ -88,10 +94,10 @@ class CustomStreamIntentResolver(private val context: Application) : StreamInten
88
94
  )
89
95
  }
90
96
 
91
- override fun searchRejectCallPendingIntent(callId: StreamCallId): PendingIntent? =
97
+ override fun searchRejectCallPendingIntent(callId: StreamCallId, payload: Map<String, Any?>): PendingIntent? =
92
98
  searchBroadcastPendingIntent(Intent(NotificationHandler.ACTION_REJECT_CALL), callId)
93
99
 
94
- override fun searchEndCallPendingIntent(callId: StreamCallId): PendingIntent? {
100
+ override fun searchEndCallPendingIntent(callId: StreamCallId, payload: Map<String, Any?>): PendingIntent? {
95
101
  val launchIntent = context.packageManager.getLaunchIntentForPackage(context.packageName)?.apply {
96
102
  action = NotificationHandler.ACTION_LEAVE_CALL
97
103
  putExtra(NotificationHandler.INTENT_EXTRA_CALL_CID, callId)
@@ -106,7 +112,7 @@ class CustomStreamIntentResolver(private val context: Application) : StreamInten
106
112
  )
107
113
  }
108
114
 
109
- override fun searchOngoingCallPendingIntent(callId: StreamCallId, notificationId: Int): PendingIntent? {
115
+ override fun searchOngoingCallPendingIntent(callId: StreamCallId, notificationId: Int, payload: Map<String, Any?>): PendingIntent? {
110
116
  val launchIntent = context.packageManager.getLaunchIntentForPackage(context.packageName)?.apply {
111
117
  action = NotificationHandler.ACTION_ONGOING_CALL
112
118
  putExtra(NotificationHandler.INTENT_EXTRA_CALL_CID, callId)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-stream-call",
3
- "version": "7.1.0",
3
+ "version": "7.1.3",
4
4
  "description": "Uses the https://getstream.io/ SDK to implement calling in Capacitor",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",