Skip to content

Commit 0a050ad

Browse files
committed
4.0.5-videochat-kotlin
1 parent 48d2bdb commit 0a050ad

21 files changed

+299
-462
lines changed

sample-videochat-kotlin/app/build.gradle

+14-24
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,42 @@
11
buildscript {
22
repositories {
33
google()
4-
jcenter()
5-
maven { url 'https://maven.fabric.io/public' }
4+
mavenCentral()
65
}
76
dependencies {
87
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinGradlePluginVersion"
9-
classpath "io.fabric.tools:gradle:$fabricToolsVersion"
108
}
119
}
1210

1311
apply plugin: 'com.android.application'
1412
apply plugin: 'kotlin-android'
1513
apply plugin: 'kotlin-android-extensions'
16-
apply plugin: 'io.fabric'
1714

1815
androidExtensions {
1916
experimental = true
2017
}
2118

2219
repositories {
2320
google()
24-
jcenter()
21+
mavenCentral()
2522
maven {
2623
url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/"
2724
}
28-
maven { url 'https://maven.fabric.io/public' }
29-
flatDir { dirs 'libs' }
3025
}
3126

3227
android {
33-
def versionQACode = 3
28+
def versionQACode = 1
3429

35-
compileSdkVersion 28
36-
buildToolsVersion "28.0.3"
30+
compileSdkVersion 31
31+
buildToolsVersion "31.0.0"
3732
flavorDimensions dimensionDefault
3833

3934
defaultConfig {
4035
applicationId "com.quickblox.sample.videochat.kotlin"
41-
minSdkVersion 16
42-
targetSdkVersion 28
43-
versionCode 404000
44-
versionName '4.0.4'
36+
minSdkVersion 21
37+
targetSdkVersion 31
38+
versionCode 405000
39+
versionName '4.0.5'
4540
multiDexEnabled true
4641
}
4742

@@ -65,12 +60,14 @@ android {
6560
minifyEnabled false
6661
shrinkResources false
6762
proguardFile 'proguard-rules.pro'
68-
zipAlignEnabled false
6963
resValue "string", "versionName", "QuickBlox Video Chat Kotlin\nBuild version " + defaultConfig.getVersionName()
7064
}
7165

7266
release {
7367
signingConfig signingConfigs.debug
68+
minifyEnabled true
69+
shrinkResources true
70+
proguardFile 'proguard-rules.pro'
7471
resValue "string", "versionName", "QuickBlox Video Chat Kotlin\nBuild version " + defaultConfig.getVersionName()
7572
}
7673
}
@@ -95,21 +92,14 @@ android {
9592
}
9693

9794
dependencies {
98-
9995
implementation "com.quickblox:quickblox-android-sdk-videochat-webrtc:$qbSdkVersion"
10096
implementation "com.quickblox:quickblox-android-sdk-messages:$qbSdkVersion"
101-
10297
implementation "com.google.firebase:firebase-core:$firebaseCoreVersion"
103-
implementation "com.github.bumptech.glide:glide:$glideVersion"
10498
implementation "com.google.android.material:material:$materialVersion"
10599
implementation "com.github.johnkil.android-robototextview:robototextview:$robotoTextViewVersion"
106-
implementation "androidx.fragment:fragment:$fragmentAndroidXVersion"
107-
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycleViewmodelAndroidXVersion"
100+
implementation "androidx.fragment:fragment-ktx:$fragmentAndroidXVersion"
101+
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleViewmodelAndroidXVersion"
108102
implementation "androidx.core:core-ktx:$coreKtxVersion"
109-
implementation("com.crashlytics.sdk.android:crashlytics:$crashlyticsVersion@aar") {
110-
transitive = true
111-
}
112-
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlinReflectVersion"
113103
}
114104

115105
apply from: "../artifacts.gradle"

sample-videochat-kotlin/app/google-services.json

+11-136
Original file line numberDiff line numberDiff line change
@@ -1,154 +1,29 @@
11
{
22
"project_info": {
3-
"project_number": "247738611464",
4-
"firebase_url": "https://qb-prod-samples.firebaseio.com",
5-
"project_id": "qb-prod-samples",
6-
"storage_bucket": "qb-prod-samples.appspot.com"
3+
"project_number": "Put here your value",
4+
"firebase_url": "https://qb-samples.firebaseio.com",
5+
"project_id": "qb-samples",
6+
"storage_bucket": "qb-samples.appspot.com"
77
},
88
"client": [
99
{
1010
"client_info": {
11-
"mobilesdk_app_id": "1:247738611464:android:beb270faa2c3a789",
11+
"mobilesdk_app_id": "Put here your value",
1212
"android_client_info": {
13-
"package_name": "com.quickblox.sample.chat.java"
14-
}
15-
},
16-
"oauth_client": [],
17-
"api_key": [
18-
{
19-
"current_key": "AIzaSyBFXAfVr6kkFJdDNOm8U-c7iju0qIUkc_A"
20-
}
21-
],
22-
"services": {
23-
"appinvite_service": {
24-
"other_platform_oauth_client": [
25-
{
26-
"client_id": "247738611464-v2nvd29bmqum7niosnfuh28oq3beh9f6.apps.googleusercontent.com",
27-
"client_type": 3
28-
}
29-
]
30-
}
31-
}
32-
},
33-
{
34-
"client_info": {
35-
"mobilesdk_app_id": "1:247738611464:android:1cdc72e9ffd29448",
36-
"android_client_info": {
37-
"package_name": "com.quickblox.sample.chat.kotlin"
38-
}
39-
},
40-
"oauth_client": [],
41-
"api_key": [
42-
{
43-
"current_key": "AIzaSyBFXAfVr6kkFJdDNOm8U-c7iju0qIUkc_A"
44-
}
45-
],
46-
"services": {
47-
"appinvite_service": {
48-
"other_platform_oauth_client": [
49-
{
50-
"client_id": "247738611464-v2nvd29bmqum7niosnfuh28oq3beh9f6.apps.googleusercontent.com",
51-
"client_type": 3
52-
}
53-
]
54-
}
55-
}
56-
},
57-
{
58-
"client_info": {
59-
"mobilesdk_app_id": "1:247738611464:android:06cb0de4c719ad84",
60-
"android_client_info": {
61-
"package_name": "com.quickblox.sample.pushnotifications.java"
62-
}
63-
},
64-
"oauth_client": [],
65-
"api_key": [
66-
{
67-
"current_key": "AIzaSyBFXAfVr6kkFJdDNOm8U-c7iju0qIUkc_A"
68-
}
69-
],
70-
"services": {
71-
"appinvite_service": {
72-
"other_platform_oauth_client": [
73-
{
74-
"client_id": "247738611464-v2nvd29bmqum7niosnfuh28oq3beh9f6.apps.googleusercontent.com",
75-
"client_type": 3
76-
}
77-
]
78-
}
79-
}
80-
},
81-
{
82-
"client_info": {
83-
"mobilesdk_app_id": "1:247738611464:android:c2749661061637f0",
84-
"android_client_info": {
85-
"package_name": "com.quickblox.sample.pushnotifications.kotlin"
86-
}
87-
},
88-
"oauth_client": [],
89-
"api_key": [
90-
{
91-
"current_key": "AIzaSyBFXAfVr6kkFJdDNOm8U-c7iju0qIUkc_A"
92-
}
93-
],
94-
"services": {
95-
"appinvite_service": {
96-
"other_platform_oauth_client": [
97-
{
98-
"client_id": "247738611464-v2nvd29bmqum7niosnfuh28oq3beh9f6.apps.googleusercontent.com",
99-
"client_type": 3
100-
}
101-
]
102-
}
103-
}
104-
},
105-
{
106-
"client_info": {
107-
"mobilesdk_app_id": "1:247738611464:android:99e5b55a490c901c",
108-
"android_client_info": {
109-
"package_name": "com.quickblox.sample.videochat.java"
13+
"package_name": "com.quickblox.sample.videochat.kotlin"
11014
}
11115
},
112-
"oauth_client": [],
113-
"api_key": [
16+
"oauth_client": [
11417
{
115-
"current_key": "AIzaSyBFXAfVr6kkFJdDNOm8U-c7iju0qIUkc_A"
18+
"client_id": "Put here your value",
19+
"client_type": 3
11620
}
11721
],
118-
"services": {
119-
"appinvite_service": {
120-
"other_platform_oauth_client": [
121-
{
122-
"client_id": "247738611464-v2nvd29bmqum7niosnfuh28oq3beh9f6.apps.googleusercontent.com",
123-
"client_type": 3
124-
}
125-
]
126-
}
127-
}
128-
},
129-
{
130-
"client_info": {
131-
"mobilesdk_app_id": "1:247738611464:android:ac22e0d1b3a3e86b",
132-
"android_client_info": {
133-
"package_name": "com.quickblox.sample.videochat.kotlin"
134-
}
135-
},
136-
"oauth_client": [],
13722
"api_key": [
13823
{
139-
"current_key": "AIzaSyBFXAfVr6kkFJdDNOm8U-c7iju0qIUkc_A"
140-
}
141-
],
142-
"services": {
143-
"appinvite_service": {
144-
"other_platform_oauth_client": [
145-
{
146-
"client_id": "247738611464-v2nvd29bmqum7niosnfuh28oq3beh9f6.apps.googleusercontent.com",
147-
"client_type": 3
148-
}
149-
]
24+
"current_key": "Put here your value"
15025
}
151-
}
26+
]
15227
}
15328
],
15429
"configuration_version": "1"
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Add project specific ProGuard rules here.
2-
# You can control the set of applied configuration files using the
3-
# proguardFiles setting in build.gradle.
2+
# By default, the flags in this file are appended to flags specified
3+
# in /home/tereha/Android/sdk/tools/proguard/proguard-android.txt
4+
# You can edit the include path and order by changing the proguardFiles
5+
# directive in build.gradle.
46
#
57
# For more details, see
68
# http://developer.android.com/guide/developing/tools/proguard.html
@@ -11,11 +13,32 @@
1113
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
1214
# public *;
1315
#}
16+
#-dontusemixedcaseclassnames
17+
#-dontskipnonpubliclibraryclasses
18+
#-verbose
19+
#
20+
21+
##---------------Begin: proguard configuration for Gson ----------
22+
# Gson uses generic type information stored in a class file when working with fields. Proguard
23+
# removes such information by default, so configure it to keep all of it.
24+
-keepattributes EnclosingMethod
25+
-keepattributes InnerClasses
26+
-keepattributes Signature
27+
-keepattributes Exceptions
28+
29+
# For using GSON @Expose annotation
30+
-keepattributes *Annotation*
31+
32+
#quickblox sdk
33+
-keep class com.quickblox.** { *; }
34+
35+
#smack xmpp library
36+
-keep class org.jxmpp.** { *; }
37+
-keep class org.jivesoftware.** { *; }
38+
-dontwarn org.jivesoftware.**
1439

15-
# Uncomment this to preserve the line number information for
16-
# debugging stack traces.
17-
#-keepattributes SourceFile,LineNumberTable
40+
#webrtc
41+
-keep class org.webrtc.** { *; }
1842

19-
# If you keep the line number information, uncomment this to
20-
# hide the original source file name.
21-
#-renamesourcefileattribute SourceFile
43+
#google gms
44+
-keep class com.google.android.gms.** { *; }

sample-videochat-kotlin/app/src/main/AndroidManifest.xml

+11-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
xmlns:tools="http://schemas.android.com/tools"
44
package="com.quickblox.sample.videochat.kotlin">
55

6-
<uses-permission android:name="android.permission.BLUETOOTH" />
76
<uses-permission android:name="android.permission.CAMERA" />
87
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
98
<uses-permission android:name="android.permission.RECORD_AUDIO" />
@@ -12,7 +11,7 @@
1211
<uses-permission android:name="com.quickblox.sample.messages.permission.C2D_MESSAGE" />
1312
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
1413
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
15-
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
14+
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
1615
<uses-permission android:name="android.permission.ACTION_MANAGE_OVERLAY_PERMISSION" />
1716

1817
<application
@@ -26,6 +25,7 @@
2625

2726
<activity
2827
android:name=".activities.SplashActivity"
28+
android:exported="true"
2929
android:screenOrientation="portrait">
3030
<intent-filter>
3131
<action android:name="android.intent.action.MAIN" />
@@ -64,15 +64,21 @@
6464

6565
<service android:name=".services.LoginService" />
6666

67-
<service android:name=".services.CallService" />
67+
<service
68+
android:foregroundServiceType="mediaProjection"
69+
android:name=".services.CallService" />
6870

69-
<service android:name=".services.fcm.PushListenerService">
71+
<service
72+
android:name=".services.fcm.PushListenerService"
73+
android:exported="false">
7074
<intent-filter>
7175
<action android:name="com.google.firebase.MESSAGING_EVENT" />
7276
</intent-filter>
7377
</service>
7478

75-
<service android:name="com.quickblox.messages.services.fcm.QBFcmPushInstanceIDService">
79+
<service
80+
android:name="com.quickblox.messages.services.fcm.QBFcmPushInstanceIDService"
81+
android:exported="false">
7682
<intent-filter>
7783
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
7884
</intent-filter>

sample-videochat-kotlin/app/src/main/java/com/quickblox/sample/videochat/kotlin/App.kt

-9
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
package com.quickblox.sample.videochat.kotlin
22

33
import android.app.Application
4-
import com.crashlytics.android.Crashlytics
54
import com.quickblox.auth.session.QBSettings
65
import com.quickblox.sample.videochat.kotlin.db.DbHelper
7-
import io.fabric.sdk.android.Fabric
86

97
//User default credentials
108
const val DEFAULT_USER_PASSWORD = "quickblox"
@@ -30,17 +28,10 @@ class App : Application() {
3028
super.onCreate()
3129
instance = this
3230
dbHelper = DbHelper(this)
33-
initFabric()
3431
checkCredentials()
3532
initCredentials()
3633
}
3734

38-
private fun initFabric() {
39-
if (!BuildConfig.DEBUG) {
40-
Fabric.with(this, Crashlytics())
41-
}
42-
}
43-
4435
private fun checkCredentials() {
4536
if (APPLICATION_ID.isEmpty() || AUTH_KEY.isEmpty() || AUTH_SECRET.isEmpty() || ACCOUNT_KEY.isEmpty()) {
4637
throw AssertionError(getString(R.string.error_qb_credentials_empty))

0 commit comments

Comments
 (0)