Skip to content

Commit

Permalink
4.0.5-videochat-kotlin
Browse files Browse the repository at this point in the history
  • Loading branch information
vdovbnya-qb committed May 26, 2022
1 parent 48d2bdb commit 0a050ad
Show file tree
Hide file tree
Showing 21 changed files with 299 additions and 462 deletions.
38 changes: 14 additions & 24 deletions sample-videochat-kotlin/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,47 +1,42 @@
buildscript {
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinGradlePluginVersion"
classpath "io.fabric.tools:gradle:$fabricToolsVersion"
}
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'io.fabric'

androidExtensions {
experimental = true
}

repositories {
google()
jcenter()
mavenCentral()
maven {
url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/"
}
maven { url 'https://maven.fabric.io/public' }
flatDir { dirs 'libs' }
}

android {
def versionQACode = 3
def versionQACode = 1

compileSdkVersion 28
buildToolsVersion "28.0.3"
compileSdkVersion 31
buildToolsVersion "31.0.0"
flavorDimensions dimensionDefault

defaultConfig {
applicationId "com.quickblox.sample.videochat.kotlin"
minSdkVersion 16
targetSdkVersion 28
versionCode 404000
versionName '4.0.4'
minSdkVersion 21
targetSdkVersion 31
versionCode 405000
versionName '4.0.5'
multiDexEnabled true
}

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

release {
signingConfig signingConfigs.debug
minifyEnabled true
shrinkResources true
proguardFile 'proguard-rules.pro'
resValue "string", "versionName", "QuickBlox Video Chat Kotlin\nBuild version " + defaultConfig.getVersionName()
}
}
Expand All @@ -95,21 +92,14 @@ android {
}

dependencies {

implementation "com.quickblox:quickblox-android-sdk-videochat-webrtc:$qbSdkVersion"
implementation "com.quickblox:quickblox-android-sdk-messages:$qbSdkVersion"

implementation "com.google.firebase:firebase-core:$firebaseCoreVersion"
implementation "com.github.bumptech.glide:glide:$glideVersion"
implementation "com.google.android.material:material:$materialVersion"
implementation "com.github.johnkil.android-robototextview:robototextview:$robotoTextViewVersion"
implementation "androidx.fragment:fragment:$fragmentAndroidXVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycleViewmodelAndroidXVersion"
implementation "androidx.fragment:fragment-ktx:$fragmentAndroidXVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleViewmodelAndroidXVersion"
implementation "androidx.core:core-ktx:$coreKtxVersion"
implementation("com.crashlytics.sdk.android:crashlytics:$crashlyticsVersion@aar") {
transitive = true
}
compile "org.jetbrains.kotlin:kotlin-reflect:$kotlinReflectVersion"
}

apply from: "../artifacts.gradle"
Expand Down
147 changes: 11 additions & 136 deletions sample-videochat-kotlin/app/google-services.json
Original file line number Diff line number Diff line change
@@ -1,154 +1,29 @@
{
"project_info": {
"project_number": "247738611464",
"firebase_url": "https://qb-prod-samples.firebaseio.com",
"project_id": "qb-prod-samples",
"storage_bucket": "qb-prod-samples.appspot.com"
"project_number": "Put here your value",
"firebase_url": "https://qb-samples.firebaseio.com",
"project_id": "qb-samples",
"storage_bucket": "qb-samples.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:247738611464:android:beb270faa2c3a789",
"mobilesdk_app_id": "Put here your value",
"android_client_info": {
"package_name": "com.quickblox.sample.chat.java"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyBFXAfVr6kkFJdDNOm8U-c7iju0qIUkc_A"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "247738611464-v2nvd29bmqum7niosnfuh28oq3beh9f6.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:247738611464:android:1cdc72e9ffd29448",
"android_client_info": {
"package_name": "com.quickblox.sample.chat.kotlin"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyBFXAfVr6kkFJdDNOm8U-c7iju0qIUkc_A"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "247738611464-v2nvd29bmqum7niosnfuh28oq3beh9f6.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:247738611464:android:06cb0de4c719ad84",
"android_client_info": {
"package_name": "com.quickblox.sample.pushnotifications.java"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyBFXAfVr6kkFJdDNOm8U-c7iju0qIUkc_A"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "247738611464-v2nvd29bmqum7niosnfuh28oq3beh9f6.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:247738611464:android:c2749661061637f0",
"android_client_info": {
"package_name": "com.quickblox.sample.pushnotifications.kotlin"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyBFXAfVr6kkFJdDNOm8U-c7iju0qIUkc_A"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "247738611464-v2nvd29bmqum7niosnfuh28oq3beh9f6.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:247738611464:android:99e5b55a490c901c",
"android_client_info": {
"package_name": "com.quickblox.sample.videochat.java"
"package_name": "com.quickblox.sample.videochat.kotlin"
}
},
"oauth_client": [],
"api_key": [
"oauth_client": [
{
"current_key": "AIzaSyBFXAfVr6kkFJdDNOm8U-c7iju0qIUkc_A"
"client_id": "Put here your value",
"client_type": 3
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "247738611464-v2nvd29bmqum7niosnfuh28oq3beh9f6.apps.googleusercontent.com",
"client_type": 3
}
]
}
}
},
{
"client_info": {
"mobilesdk_app_id": "1:247738611464:android:ac22e0d1b3a3e86b",
"android_client_info": {
"package_name": "com.quickblox.sample.videochat.kotlin"
}
},
"oauth_client": [],
"api_key": [
{
"current_key": "AIzaSyBFXAfVr6kkFJdDNOm8U-c7iju0qIUkc_A"
}
],
"services": {
"appinvite_service": {
"other_platform_oauth_client": [
{
"client_id": "247738611464-v2nvd29bmqum7niosnfuh28oq3beh9f6.apps.googleusercontent.com",
"client_type": 3
}
]
"current_key": "Put here your value"
}
}
]
}
],
"configuration_version": "1"
Expand Down
39 changes: 31 additions & 8 deletions sample-videochat-kotlin/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
# By default, the flags in this file are appended to flags specified
# in /home/tereha/Android/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
Expand All @@ -11,11 +13,32 @@
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
#-dontusemixedcaseclassnames
#-dontskipnonpubliclibraryclasses
#-verbose
#

##---------------Begin: proguard configuration for Gson ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes EnclosingMethod
-keepattributes InnerClasses
-keepattributes Signature
-keepattributes Exceptions

# For using GSON @Expose annotation
-keepattributes *Annotation*

#quickblox sdk
-keep class com.quickblox.** { *; }

#smack xmpp library
-keep class org.jxmpp.** { *; }
-keep class org.jivesoftware.** { *; }
-dontwarn org.jivesoftware.**

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable
#webrtc
-keep class org.webrtc.** { *; }

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
#google gms
-keep class com.google.android.gms.** { *; }
16 changes: 11 additions & 5 deletions sample-videochat-kotlin/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.quickblox.sample.videochat.kotlin">

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
Expand All @@ -12,7 +11,7 @@
<uses-permission android:name="com.quickblox.sample.messages.permission.C2D_MESSAGE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.ACTION_MANAGE_OVERLAY_PERMISSION" />

<application
Expand All @@ -26,6 +25,7 @@

<activity
android:name=".activities.SplashActivity"
android:exported="true"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down Expand Up @@ -64,15 +64,21 @@

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

<service android:name=".services.CallService" />
<service
android:foregroundServiceType="mediaProjection"
android:name=".services.CallService" />

<service android:name=".services.fcm.PushListenerService">
<service
android:name=".services.fcm.PushListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>

<service android:name="com.quickblox.messages.services.fcm.QBFcmPushInstanceIDService">
<service
android:name="com.quickblox.messages.services.fcm.QBFcmPushInstanceIDService"
android:exported="false">
<intent-filter>
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package com.quickblox.sample.videochat.kotlin

import android.app.Application
import com.crashlytics.android.Crashlytics
import com.quickblox.auth.session.QBSettings
import com.quickblox.sample.videochat.kotlin.db.DbHelper
import io.fabric.sdk.android.Fabric

//User default credentials
const val DEFAULT_USER_PASSWORD = "quickblox"
Expand All @@ -30,17 +28,10 @@ class App : Application() {
super.onCreate()
instance = this
dbHelper = DbHelper(this)
initFabric()
checkCredentials()
initCredentials()
}

private fun initFabric() {
if (!BuildConfig.DEBUG) {
Fabric.with(this, Crashlytics())
}
}

private fun checkCredentials() {
if (APPLICATION_ID.isEmpty() || AUTH_KEY.isEmpty() || AUTH_SECRET.isEmpty() || ACCOUNT_KEY.isEmpty()) {
throw AssertionError(getString(R.string.error_qb_credentials_empty))
Expand Down
Loading

0 comments on commit 0a050ad

Please sign in to comment.