From bd5f587c32e10d8b0765f8e92417246ebef429cf Mon Sep 17 00:00:00 2001 From: Charles Dyason Date: Mon, 11 Sep 2023 01:30:00 +0200 Subject: [PATCH 1/3] Rework focusClientWindow --- example/web/twilio-sw.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/example/web/twilio-sw.js b/example/web/twilio-sw.js index 61348b33..ee290bc7 100644 --- a/example/web/twilio-sw.js +++ b/example/web/twilio-sw.js @@ -110,12 +110,12 @@ function focusClientWindow() { self.clients.matchAll({ type: "window", }).then((clients) => { - for (const client of clients) { - if (client.url === "/" && "focus" in client) return client.focus(); - } - if (clients.openWindow) return clients.openWindow("/"); - }).catch((error) => { - _error('Could not focus client window', error); + clients + .filter(value => !value.focused) + .filter(value => "focus" in value) + .forEach((client) => { + client.focus().catch((error) => _error('Error focusing client window', error)); + }); }); } From 1804cd48c68d87b61f2e2de7d60c2a5c46e61ee4 Mon Sep 17 00:00:00 2001 From: Charles Dyason Date: Mon, 11 Sep 2023 01:31:02 +0200 Subject: [PATCH 2/3] Remove unused notifications.js script import --- example/web/index.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/example/web/index.html b/example/web/index.html index 55513db0..c34e6659 100644 --- a/example/web/index.html +++ b/example/web/index.html @@ -42,8 +42,6 @@ - - From a756abd1e4f98d433487205ccfbf0029c050b78b Mon Sep 17 00:00:00 2001 From: Charles Dyason Date: Mon, 11 Sep 2023 01:49:42 +0200 Subject: [PATCH 3/3] Update changelog --- CHANGELOG.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 354d07f3..4d5aecea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ## Next release + * Feat: [Android] Turn off the screen when a call is active and the head is against the handset. @solid-software (https://solid.software) * Feat: [macOS] Added support for macOS, based on iOS implementation backed by Twilio Voice Web (twilio-voice.js [v2.4.1-dev-custom](https://github.com/cybex-dev/twilio-voice.js/tree/2.4.1-dev-custom)). * Feat: [Web] Web support with notifications (via Service Worker) with live example at https://twilio-voice-web.web.app @cybex-dev @@ -7,7 +8,7 @@ * Feat: [iOS] Add support for changing callkit icon (future plans to extended this for Flutter assets) @cybex-dev * [twilio_voice_mimp:0.2.5) fix 4 Null Pointer execption Android * [twilio_voice_mimp:0.2.4) add Android DE Local -* [twilio_voice_mimp:0.2.4) add Android IT Local +* [twilio_voice_mimp:0.2.4) add Android IT Local * [twilio_voice_mimp:0.2.3) Upgrade to Twilio Android SDK 6.1.2 / iOS SDK 6.4.2 * [twilio_voice_mimp:0.2.3) small Bugfix for null pointer Exception * [twilio_voice_mimp:0.2.2) more Magic is needed with FLAG_MUTABLE (Android 12) @@ -39,29 +40,37 @@ * Fix: [Android] Incorrect call direction for incoming calls * Fix: call ringing event always showing `CallDirection.outgoing` * Fix: [Android] Updated CallKit incoming/outgoing name parameter resolution +* Fix: [Web] Notification actions working intermittently. ## 0.0.9 + * Feat: forwarded callInvite custom parameters to flutter ## 0.0.8 + * Renamed callkit logo * Merge-Android: Fixed null pointer exception for eventSink occurs in mute call. @GKPK ## 0.0.7 + * Fixed from param on android ## 0.0.6 + * Added android extra call params ## 0.0.5 + * Updated Twilio SDK versions * Added example proguard-rules.pro for android ## 0.0.4 + * Fixes deprecation error with Xcode 12.5 * removed "client" from ids ## 0.0.3 + * Added missed call notifications * Updated Android SDK * Added localization files