Skip to content

Commit 85e000b

Browse files
authored
project: add flutter_voice project (#38)
* project: add flutter_voice project * feat(flutter_voice): add support for callkit * WIP * update to 1.4.2 * callkit * support incomming calls on android via push
1 parent e36a44f commit 85e000b

File tree

93 files changed

+4245
-1
lines changed

Some content is hidden

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

93 files changed

+4245
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,4 @@ Pods/
5151

5252
# google creds
5353
gapp-creds.json
54+
google-services.json
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.buildlog/
9+
.history
10+
.svn/
11+
migrate_working_dir/
12+
13+
# IntelliJ related
14+
*.iml
15+
*.ipr
16+
*.iws
17+
.idea/
18+
19+
# The .vscode folder contains launch configuration and tasks you configure in
20+
# VS Code which you may wish to be included in version control, so this line
21+
# is commented out by default.
22+
#.vscode/
23+
24+
# Flutter/Dart/Pub related
25+
**/doc/api/
26+
**/ios/Flutter/.last_build_id
27+
.dart_tool/
28+
.flutter-plugins
29+
.flutter-plugins-dependencies
30+
.pub-cache/
31+
.pub/
32+
/build/
33+
34+
# Symbolication related
35+
app.*.symbols
36+
37+
# Obfuscation related
38+
app.*.map.json
39+
40+
# Android Studio will place build artifacts here
41+
/android/app/debug
42+
/android/app/profile
43+
/android/app/release
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: "2e9cb0aa71a386a91f73f7088d115c0d96654829"
8+
channel: "stable"
9+
10+
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829
17+
base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829
18+
- platform: android
19+
create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829
20+
base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829
21+
- platform: ios
22+
create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829
23+
base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829
24+
- platform: web
25+
create_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829
26+
base_revision: 2e9cb0aa71a386a91f73f7088d115c0d96654829
27+
28+
# User provided section
29+
30+
# List of Local paths (relative to this file) that should be
31+
# ignored by the migrate tool.
32+
#
33+
# Files that are not part of the templates will be ignored by default.
34+
unmanaged_files:
35+
- 'lib/main.dart'
36+
- 'ios/Runner.xcodeproj/project.pbxproj'
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Flutter: Attach to Device",
9+
"type": "dart",
10+
"request": "attach"
11+
},
12+
{
13+
"name": "flutter_voice",
14+
"request": "launch",
15+
"type": "dart"
16+
},
17+
{
18+
"name": "flutter_voice (profile mode)",
19+
"request": "launch",
20+
"type": "dart",
21+
"flutterMode": "profile"
22+
},
23+
{
24+
"name": "flutter_voice (release mode)",
25+
"request": "launch",
26+
"type": "dart",
27+
"flutterMode": "release"
28+
}
29+
]
30+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# flutter_voice
2+
3+
A Flutter example Project for the Vonage Client SDK's for iOS, Android and Web.
4+
5+
**Note:** this project is not a production ready application, it is only intended to demonstrate the use of the Vonage Client SDK's and
6+
is currently missing features required for a production application such push notifications, etc.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This file configures the analyzer, which statically analyzes Dart code to
2+
# check for errors, warnings, and lints.
3+
#
4+
# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
5+
# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
6+
# invoked from the command line by running `flutter analyze`.
7+
8+
# The following line activates a set of recommended lints for Flutter apps,
9+
# packages, and plugins designed to encourage good coding practices.
10+
include: package:flutter_lints/flutter.yaml
11+
12+
linter:
13+
# The lint rules applied to this project can be customized in the
14+
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
15+
# included above or to enable additional rules. A list of all available lints
16+
# and their documentation is published at https://dart.dev/lints.
17+
#
18+
# Instead of disabling a lint rule for the entire project in the
19+
# section below, it can also be suppressed for a single line of code
20+
# or a specific dart file by using the `// ignore: name_of_lint` and
21+
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
22+
# producing the lint.
23+
rules:
24+
# avoid_print: false # Uncomment to disable the `avoid_print` rule
25+
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
26+
27+
# Additional information about this file can be found at
28+
# https://dart.dev/guides/language/analysis-options
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
gradle-wrapper.jar
2+
/.gradle
3+
/captures/
4+
/gradlew
5+
/gradlew.bat
6+
/local.properties
7+
GeneratedPluginRegistrant.java
8+
9+
# Remember to never publicly share your keystore.
10+
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
11+
key.properties
12+
**/*.keystore
13+
**/*.jks
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
plugins {
2+
id "com.android.application"
3+
id 'com.google.gms.google-services'
4+
id "kotlin-android"
5+
id 'kotlin-kapt'
6+
id 'com.google.dagger.hilt.android'
7+
id "dev.flutter.flutter-gradle-plugin"
8+
}
9+
10+
def localProperties = new Properties()
11+
def localPropertiesFile = rootProject.file('local.properties')
12+
if (localPropertiesFile.exists()) {
13+
localPropertiesFile.withReader('UTF-8') { reader ->
14+
localProperties.load(reader)
15+
}
16+
}
17+
18+
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
19+
if (flutterVersionCode == null) {
20+
flutterVersionCode = '1'
21+
}
22+
23+
def flutterVersionName = localProperties.getProperty('flutter.versionName')
24+
if (flutterVersionName == null) {
25+
flutterVersionName = '1.0'
26+
}
27+
28+
android {
29+
namespace "com.vonage.flutter_voice"
30+
compileSdkVersion 33
31+
ndkVersion flutter.ndkVersion
32+
33+
compileOptions {
34+
sourceCompatibility JavaVersion.VERSION_1_8
35+
targetCompatibility JavaVersion.VERSION_1_8
36+
}
37+
38+
kotlinOptions {
39+
jvmTarget = '1.8'
40+
}
41+
42+
sourceSets {
43+
main.java.srcDirs += 'src/main/kotlin'
44+
}
45+
46+
defaultConfig {
47+
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
48+
applicationId "com.vonage.flutter_voice"
49+
// You can update the following values to match your application needs.
50+
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
51+
minSdkVersion 26
52+
targetSdkVersion flutter.targetSdkVersion
53+
versionCode flutterVersionCode.toInteger()
54+
versionName flutterVersionName
55+
}
56+
57+
buildTypes {
58+
release {
59+
// TODO: Add your own signing config for the release build.
60+
// Signing with the debug keys for now, so `flutter run --release` works.
61+
signingConfig signingConfigs.debug
62+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
63+
64+
}
65+
}
66+
}
67+
68+
flutter {
69+
source '../..'
70+
}
71+
72+
// Allow references to generated code
73+
kapt {
74+
correctErrorTypes true
75+
}
76+
77+
dependencies {
78+
implementation platform('com.google.firebase:firebase-bom:32.7.1')
79+
implementation "com.vonage:client-sdk-voice:1.4.2"
80+
implementation 'com.google.firebase:firebase-messaging:23.4.0'
81+
implementation "com.google.dagger:hilt-android:2.44"
82+
implementation 'androidx.appcompat:appcompat:1.6.1'
83+
kapt "com.google.dagger:hilt-compiler:2.44"
84+
kapt("com.google.dagger:hilt-android-compiler:2.44")
85+
86+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
-keeppackagenames
2+
-keep class org.webrtc.** { *; }
3+
-keep class org.vonage.** { *; }
4+
-keep class com.vonage.** { *; }
5+
-keep class com.hiennv.flutter_callkit_incoming.** { *; }
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
2+
<!-- The INTERNET permission is required for development. Specifically,
3+
the Flutter tool needs it to communicate with the running application
4+
to allow setting breakpoints, to provide hot reload, etc.
5+
-->
6+
<uses-permission android:name="android.permission.INTERNET"/>
7+
</manifest>

0 commit comments

Comments
 (0)