Skip to content

Commit 404f3f3

Browse files
committed
v 0.0.3
1 parent 7f15ab7 commit 404f3f3

20 files changed

+416
-264
lines changed

.idea/codeStyles/Project.xml

+116
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

+125-113
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
## 0.0.2
1+
## 0.0.3
2+
* metadata changes and display Name for call to
23

34
## 0.0.2 - 2019-07-26
45
* modified makeCall parameter order and added some samples

README.md

+14
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@ View Twilio Documentation on Access Token Generation: https://www.twilio.com/doc
4444
4545
```
4646

47+
## Listen for Call Events
48+
```
49+
FlutterTwilioVoice.phoneCallEventSubscription.listen((data)
50+
{
51+
setState(() {
52+
_callStatus = data.toString();
53+
});
54+
}, onError: (error) {
55+
setState(() {
56+
print(error);
57+
});
58+
});
59+
60+
```
4761

4862
## To Do
4963

android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ group 'com.dormmom.flutter_twilio_voice'
22
version '1.0-SNAPSHOT'
33

44
buildscript {
5-
ext.kotlin_version = '1.2.71'
5+
ext.kotlin_version = '1.3.10'
66
repositories {
77
google()
88
jcenter()

example/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ View Twilio Documentation on Access Token Generation: https://www.twilio.com/doc
1111

1212
```
1313
await FlutterTwilioVoice.makeCall(to: "$client_identifier_or_number_to_call",
14-
accessTokenUrl: "https://${YOUR-SERVER-URL}/accesstoken");
14+
accessTokenUrl: "https://${YOUR-SERVER-URL}/accesstoken", toDisplayName: "Friendly_Name");
1515
```
1616

1717

example/android/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
buildscript {
2-
ext.kotlin_version = '1.2.71'
2+
ext.kotlin_version = '1.3.10'
33
repositories {
44
google()
55
jcenter()
66
}
77

88
dependencies {
9-
classpath 'com.android.tools.build:gradle:3.2.1'
9+
classpath 'com.android.tools.build:gradle:3.4.2'
1010
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1111
}
1212
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Fri Jun 23 08:50:38 CEST 2017
1+
#Tue Sep 03 01:33:06 EDT 2019
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
# This is a generated file; do not edit or check into version control.
3+
export "FLUTTER_ROOT=/Users/eopeter/Development/flutter"
4+
export "FLUTTER_APPLICATION_PATH=/Users/eopeter/Projects/Flutter/Plugins/flutter_twilio_voice/example"
5+
export "FLUTTER_TARGET=lib/main.dart"
6+
export "FLUTTER_BUILD_DIR=build"
7+
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
8+
export "FLUTTER_FRAMEWORK_DIR=/Users/eopeter/Development/flutter/bin/cache/artifacts/engine/ios"

example/ios/Podfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
22
- Flutter (1.0.0)
3-
- flutter_twilio_voice (0.0.1):
3+
- flutter_twilio_voice (0.0.2):
44
- Flutter
55
- TwilioVoice (~> 4.1)
66
- TwilioVoice (4.1.0)
@@ -21,7 +21,7 @@ EXTERNAL SOURCES:
2121

2222
SPEC CHECKSUMS:
2323
Flutter: 58dd7d1b27887414a370fcccb9e645c08ffd7a6a
24-
flutter_twilio_voice: 2dfbf9570c909751cff19a4b8566b7de3718609c
24+
flutter_twilio_voice: 16a9c30db5ed1914ec622d8cb82515056ff55cc0
2525
TwilioVoice: f02ca9098bd746c9eeb4b9888998aa74cd17f3b8
2626

2727
PODFILE CHECKSUM: 57404445183a62c76f3fc9efaf2238cd4f60c3b9

example/lib/dialbutton.dart

-39
This file was deleted.

example/lib/dialpad.dart

-61
This file was deleted.

example/lib/main.dart

+29-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import 'dart:async';
44
import 'package:flutter/services.dart';
55
import 'package:flutter_twilio_voice/flutter_twilio_voice.dart';
66

7-
import 'dialpad.dart';
87

98
void main() => runApp(MyApp());
109

@@ -15,6 +14,8 @@ class MyApp extends StatefulWidget {
1514

1615
class _MyAppState extends State<MyApp> {
1716
String _platformVersion = 'Unknown';
17+
String _eventMessage;
18+
1819
TextEditingController _controller;
1920

2021
@override
@@ -45,6 +46,30 @@ class _MyAppState extends State<MyApp> {
4546
});
4647
}
4748

49+
void _onEvent(Object event) {
50+
51+
setState(() {
52+
53+
_eventMessage = "Battery status: ${event == 'charging' ? '' : 'dis'}charging.";
54+
55+
});
56+
57+
}
58+
59+
60+
61+
62+
void _onError(Object error) {
63+
64+
setState(() {
65+
66+
_eventMessage = 'Battery status: unknown.';
67+
68+
});
69+
70+
}
71+
72+
4873
@override
4974
Widget build(BuildContext context) {
5075
return MaterialApp(
@@ -61,9 +86,9 @@ class _MyAppState extends State<MyApp> {
6186
TextFormField(controller: _controller, decoration: InputDecoration(labelText: 'Client Identifier or Phone Number'),),
6287
SizedBox(height: 10,),
6388
RaisedButton(child: Text("Make Call"), onPressed: () async {
64-
await FlutterTwilioVoice.makeCall(
65-
accessTokenUrl: "https://{YOUR_SERVER_URL}/accesstoken",
66-
to: _controller.text);
89+
FlutterTwilioVoice.phoneCallEventSubscription.listen(_onEvent, onError: _onError);
90+
FlutterTwilioVoice.receiveCalls("alice");
91+
FlutterTwilioVoice.makeCall(to: "555555555", accessTokenUrl: "https://{SERVER_URL}/accesstoken", toDisplayName: "James Bond" );
6792
},)
6893
],),
6994
)),

0 commit comments

Comments
 (0)