Skip to content

Commit 2e08483

Browse files
authored
Merge branch 'master' into more_phone_support
2 parents 24fb265 + e6483e2 commit 2e08483

File tree

76 files changed

+1858
-13226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1858
-13226
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: Flutter Build and Test only
7+
8+
on:
9+
push:
10+
branches: [ "master" ]
11+
pull_request:
12+
branches: [ "master" ]
13+
14+
workflow_dispatch:
15+
16+
env:
17+
FLUTTER_VERSION: 3.27.4
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- name: Checkout code
25+
uses: actions/checkout@v3
26+
27+
- name: Install Flutter
28+
uses: subosito/flutter-action@v2
29+
with:
30+
flutter-version: ${{ env.FLUTTER_VERSION }}
31+
channel: 'stable'
32+
cache: true
33+
34+
- run: flutter --version
35+
36+
- name: Install dependencies
37+
run: flutter pub get
38+
39+
- name: Analyze project source
40+
run: flutter analyze
41+
42+
- name: Run tests
43+
run: flutter test --coverage

.github/workflows/flutter.yml renamed to .github/workflows/flutter_web-build-deploy.yml

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,29 @@
33
# separate terms of service, privacy policy, and support
44
# documentation.
55

6-
name: Flutter analyze, test & deploy example web app
6+
name: Flutter Web deploy Example to Firebase Hosting
77

88
on:
99
push:
10-
branches: [ "master" ]
11-
pull_request:
12-
branches: [ "master" ]
10+
branches: [ "prod" ]
1311

1412
workflow_dispatch:
1513

14+
env:
15+
FLUTTER_VERSION: 3.27.4
16+
1617
jobs:
1718
build:
1819
runs-on: ubuntu-latest
1920

2021
steps:
2122
- name: Checkout code
22-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2324

2425
- name: Install Flutter
2526
uses: subosito/flutter-action@v2
2627
with:
27-
flutter-version: '3.10.6'
28+
flutter-version: ${{ env.FLUTTER_VERSION }}
2829
channel: 'stable'
2930
cache: true
3031

@@ -33,39 +34,31 @@ jobs:
3334
- name: Install dependencies
3435
run: flutter pub get
3536

36-
- name: Analyze project source
37-
run: flutter analyze
37+
- name: Enable web support
38+
run: flutter config --enable-web
3839

39-
- name: Run tests
40-
run: flutter test --coverage
40+
- name: Create web build with release mode
41+
run: |
42+
cd ./example
43+
flutter build web --release --target=lib/main.dart --output=build/web
4144
42-
deploy-example-web:
45+
- name: Archive Production Artifact
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: web-build
49+
path: example/build/web
50+
51+
deploy:
4352
runs-on: ubuntu-latest
4453
needs: build
45-
4654
steps:
47-
- uses: actions/checkout@v2
55+
- uses: actions/checkout@v4
4856

49-
- name: Setup Flutter build environment
50-
uses: subosito/flutter-action@v2
51-
with:
52-
flutter-version: '3.10.6'
53-
channel: 'stable'
54-
cache: true
55-
56-
- run: flutter --version
57-
- run: flutter pub get
58-
- run: flutter config --enable-web
59-
- run: cd ./example; flutter build web --release --target=lib/main.dart --output=build/web
60-
61-
- name: Update service worker
62-
run: cat ./example/service-worker/twilio-sw.js >> ./example/build/web/flutter_service_worker.js
63-
64-
- name: Archive Production Artifact
65-
uses: actions/upload-artifact@master
57+
- name: Download Production Artifact
58+
uses: actions/download-artifact@v4
6659
with:
6760
name: web-build
68-
path: example/build/web
61+
path: ./example/build/web
6962

7063
- name: Firebase Deploy
7164
uses: FirebaseExtended/action-hosting-deploy@v0

CHANGELOG.md

Lines changed: 96 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,100 @@
1-
## Next release
2-
* Update example
3-
* [Web] Update example with Firebase Analytics (Web, optional)
4-
* [Web] Added environment registration support
1+
## Next Release
2+
3+
* BREAKING CHANGES:
4+
* Feat: Completed migration to Federated Plugin structure. This requires one change:
5+
```dart
6+
/// old
7+
TwilioVoice.instance
8+
9+
// new
10+
TwilioVoicePlatform.instance
11+
```
12+
* Feat: [Web] Add Twilio Device [DeviceState] accessor protecting un/registration.
13+
* Feat: [Web] Add Twilio Device `updateToken(String)` function to allow updating of active device tokens.
14+
* Fix: [Web] Twilio Device does not unregister on `unregister()` method call due to 'device.off' not visible in js object causing device event listeners to remain attached on unregistered device.
15+
* Feat: [Web] Check unnecessary updating device with the same token.
16+
* Feat: [Web] Update internal [CallStatus] mapping method.
17+
* Fix: [Web] Await Twilio Device `register()` and `unregister()` method calls.
18+
* Fix: [Web] Prevent duplicate `TwilioVoiceWeb` instances.
19+
* Feat: [iOS] Add support for call logging via `enableCallLogging(bool)` to record call in recents. No other platform currently supports this, see [NOTES.md](NOTES.md#limitations) for more details.
20+
* Feat: update example.
21+
* Docs: update CHANGELOG
22+
23+
## 0.3.2+2
24+
25+
* Fix: [iOS] show caller number or interpretted client name for performStartCallAction
26+
* Docs: update CHANGELOG
27+
28+
## 0.3.2+1
29+
30+
* Fix: [iOS] Missed call notifications now show caller name (or full number) on title, and "Missed call" text in body. [Issue #299](https://github.com/cybex-dev/twilio_voice/issues/299)
31+
* Feat: [iOS] show caller number or interpretted client name for reportingIncomingCall and missed call notification
32+
* Docs: update CHANGELOG
33+
34+
## 0.3.2
35+
36+
* Fix: [iOS] Add missing `deviceToken` when reporting 'DEVICETOKEN' `CallEvent`. [Issue #241](https://github.com/cybex-dev/twilio_voice/issues/241)
37+
* Fix: [iOS] Notifications not showing when app is in foreground.
38+
39+
## 0.3.1
40+
41+
* Fix: [iOS] Fix `hangUp()` not ending incoming call when call is ringing. [Issue #244](https://github.com/cybex-dev/twilio_voice/issues/244)
42+
* Feat: [iOS] Add missing `answer()` native implementation. [Issue #244](https://github.com/cybex-dev/twilio_voice/issues/244)
43+
* Feat: Add raw `Connect({Map<String, dynamic>?})` for all platforms
44+
* Refactor: [Web] Removed unused `web_callkit` event listeners.
45+
* Fix: [Web] Check if call SID is present when call is disconnected (this occurs if the call ends abruptly after starting, and `params` does not contain `CallSid`).
46+
* Fix: [iOS] unregister removes device push token preventing new access token registration (i.e. user 1 logs out, user 2 and more won't receive any calls). Thanks to [@VinceDollo](https://github.com/VinceDollo) & [@Erchil66](https://github.com/Erchil66) [Issue #273](https://github.com/cybex-dev/twilio_voice/issues/273)
47+
* Fix: [Android] placing outgoing call then ending immediately results in no Flutter plugin not registering call ended. Thanks to [@RageshAntonyHM](https://github.com/RageshAntonyHM) & [@Erchil66](https://github.com/Erchil66) [Issue #275](https://github.com/cybex-dev/twilio_voice/issues/275)
48+
* Fix: [Android] Migrate to declarative plugins block from Flutter's `app_plugin_loader` Gradle plugin. (see: [Deprecated imperative apply of Flutter's Gradle plugins](https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply))
49+
* Docs: update CHANGELOG, TODO
50+
51+
## 0.3.0+1
52+
53+
* Fix: [Web] add missing web_callkit outgoing call notification
54+
* Docs: update CHANGELOG, README
55+
56+
## 0.3.0
57+
* BREAKING CHANGES:
58+
* Feat: [Web] Add [web_callkit](https://pub.dev/packages/web_callkit) support. Please see updated [Web Setup](README.md#web-setup) section in the README for details.
59+
* Docs: update README, NOTES & CHANGELOG
60+
* Feat: [Web] Update example with custom incoming ringtone field.
61+
* Feat: [Web] Add custom sounds for Twilio Device using `updateSound(SoundName, String?)` or `updateSounds(Map<String, String>)` methods.
62+
* Fix: [Android] `call.isOnCall()` returns true when call is declined
63+
* Fix: [Android] handle reject vs error disconnect cause with message.
64+
* Logging: [Android] Added error code fallback
65+
* Feat: Update example permissions screen & changed `local` to `URL` registration method
66+
* Fix: [macOS] Remove deprecated `.alert` presentation option. [@AndreiMisiukevich](https://github.com/AndreiMisiukevich)
67+
* Feat: [macOS] Add native microphone permission with `AVCaptureDevice` (this replaces `getUserMedia()` from js interop available on localhost/https only). [@AndreiMisiukevich](https://github.com/AndreiMisiukevich)
68+
* Fix/Update: [macOS] correct runtime entitlement for `audio-input` permission. [@AndreiMisiukevich](https://github.com/AndreiMisiukevich)
69+
70+
## 0.2.2
71+
72+
* Fix: [Android] Fix cancelling call when app is in background throws [BackgroundServiceStartNotAllowedException](https://developer.android.com/reference/android/app/BackgroundServiceStartNotAllowedException). [Issue #204](https://github.com/cybex-dev/twilio_voice/issues/204)
73+
* Fix: [Web] Fixed microphone permission (using `getUserMedia`) for Firefox & Safari. [Issue #260](https://github.com/cybex-dev/twilio_voice/issues/260). Credit to [@AndreiMisiukevich](https://github.com/AndreiMisiukevich)
74+
75+
## 0.2.1
76+
77+
* Fix: [iOS] Race condition ending call remotely and locally results in a "End Call Failed: The operation couldn’t be completed." error. [Issue #184](https://github.com/cybex-dev/twilio_voice/issues/184)
78+
* Fix: [iOS] Plugin messages sent via Event Sink throwing an error due to sending from background thread. [Issue #256](https://github.com/cybex-dev/twilio_voice/issues/256)
79+
80+
## 0.2.0+1
81+
82+
* Fix: [Web] `window.localStorage` deprecated members
83+
* Updated README.md
84+
85+
## 0.2.0
86+
* [Android] Support (long-awaited) AGP 8 update
87+
* [Android, iOS] Update Twilio SDKs to latest versions, see release notes for:
88+
* [Android 6.9.0](https://www.twilio.com/docs/voice/sdks/android/3x-changelog#690), and
89+
* [iOS 6.13.0](https://www.twilio.com/docs/voice/sdks/ios/changelog#6130),
90+
* _web coming soon with callkit integration_
91+
* Update: example
92+
* Added: [Web] environment registration support
593
* Added `defines.config.json` file to example to support environment configuration used with ```flutter run --dart-defines-file=defines.config.json```
6-
* [Web] Added `FIREBASE_ENABLE` defines to initialize Firebase only if set to true
7-
* [Web] Added raw `Connect({Map<String, dynamic>?})` sent to TwiML webhook.
8-
* [Android] Fix `showMissedCallNotifications` not working due to incorrect method channel name
94+
* Added: [Web] `FIREBASE_ENABLE` defines to initialize Firebase only if set to true
95+
* Update: [Web] Update example with Firebase Analytics (Web, optional)
96+
* Added: [Web] Added raw `Connect({Map<String, dynamic>?})` sent to TwiML webhook.
97+
* Fix: [Android] `showMissedCallNotifications` not working due to incorrect method channel name
998

1099
## 0.1.3
11100
* Added: CallEvents:

NOTES.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11

22
# Notes
33

4+
### Web
5+
6+
Web implementation relies on the [js_notifications](https://pub.dev/packages/js_notifications) package for browser notifications. These notifications including Call functionality is used by a middleware package [web_callkit](https://pub.dev/packages/web_callkit) which provides boilerplate for call management and browser notification integration.
7+
8+
- `js_notifications` requires the service worker file `js_notifications-sw.js` to be copied to your web directory. This file is used for handling notifications in the background.
9+
- `web_callkit` provides the boilerplate for call management and browser notification integration, however this package requires both files used in `js_notifications` package.
10+
11+
Further, and most importantly the `twilio_voice` package makes use of custom [twilio_voice.js](https://github.com/twilio/twilio-voice.js/) implementation (these changes are purely to provided Flutter status outputs allowing Flutter to monitor the status of the Twilio Device).
12+
13+
The javascript files required by `twilio_voice` is `twilio.min.js`, which is found in the `example/web` folder. This may in future be loaded dynamically, but for now is required to be provided in the `web/` folder.
14+
415
### Android
516

617
**Package Information:**
@@ -81,6 +92,17 @@ end
8192

8293
## Limitations
8394

95+
### Android
96+
97+
Android `ConnectionService` provides the fundamentals to managing calls, including but not limited to call logging. Using a Managed `ConnectionService` means that call logging is handled by the system's "Phone App", and so there is not access or control over call logging at this time.
98+
8499
### macOS
85100

86-
Clearly, macOS isn't uppermost in mind when looking at a mobile first platform like Flutter. There are some functionality limitations for the platform/interop such as [UIImage](https://docs.flutter.dev/ui/assets-and-images#loading-ios-images-in-flutter) support and Twilio Voice library support as a whole. Hopefully we'll be seeing these implemented in future.
101+
Clearly, macOS isn't uppermost in mind when looking at a mobile first platform like Flutter. There are some functionality limitations for the platform/interop such as [UIImage](https://docs.flutter.dev/ui/assets-and-images#loading-ios-images-in-flutter) support and Twilio Voice library support as a whole. Hopefully we'll be seeing these implemented in future.
102+
103+
With respect to CallKit integration for macOS, there isn't any direct support for CallKit other than via MacCatalyst which at present is somewhat out of scope for the project at this time.
104+
105+
106+
### Web
107+
108+
As Web uses a custom [WebCallkit](https://github.com/cybex-dev/web_callkit) integration, this facilitates basic call management and browser notification integration. Call logging is not supported at this time.

0 commit comments

Comments
 (0)