@capgo/capacitor-stream-call 0.0.93 → 0.0.95

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.
@@ -605,8 +605,17 @@ class StreamCallPlugin : Plugin() {
605
605
  callerName: String?,
606
606
  shouldHaveContentIntent: Boolean
607
607
  ): NotificationCompat.Builder {
608
- return builder.setContentIntent(fullScreenPendingIntent)
609
- .setFullScreenIntent(fullScreenPendingIntent, true)
608
+ val keyguardManager = application.getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager
609
+ val isLocked = keyguardManager.isKeyguardLocked
610
+
611
+ return if (isLocked) {
612
+ // Only full-screen intent when locked to avoid double notification
613
+ builder.setFullScreenIntent(fullScreenPendingIntent, true)
614
+ } else {
615
+ // Both intents when unlocked for clickable notification
616
+ builder.setContentIntent(fullScreenPendingIntent)
617
+ .setFullScreenIntent(fullScreenPendingIntent, true)
618
+ }
610
619
  }
611
620
  }
612
621
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-stream-call",
3
- "version": "0.0.93",
3
+ "version": "0.0.95",
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",