Skip to content

Commit 80c2a03

Browse files
committed
4.2.9-chat-kotlin
1 parent bd3809b commit 80c2a03

File tree

6 files changed

+20
-134
lines changed

6 files changed

+20
-134
lines changed

sample-chat-kotlin/app/build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ android {
3535
applicationId "com.quickblox.sample.chat.kotlin"
3636
minSdkVersion 21
3737
targetSdkVersion 31
38-
versionCode 428000
39-
versionName '4.2.8-kotlin'
38+
versionCode 429000
39+
versionName '4.2.9'
4040
multiDexEnabled true
4141
}
4242

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

+4-124
Original file line numberDiff line numberDiff line change
@@ -1,149 +1,29 @@
11
{
22
"project_info": {
3-
"project_number": "247738611464",
3+
"project_number": "Put here your value",
44
"firebase_url": "https://qb-prod-samples.firebaseio.com",
55
"project_id": "qb-prod-samples",
66
"storage_bucket": "qb-prod-samples.appspot.com"
77
},
88
"client": [
99
{
1010
"client_info": {
11-
"mobilesdk_app_id": "1:247738611464:android:beb270faa2c3a789",
12-
"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",
11+
"mobilesdk_app_id": "Put here your value",
3612
"android_client_info": {
3713
"package_name": "com.quickblox.sample.chat.kotlin"
3814
}
3915
},
4016
"oauth_client": [],
4117
"api_key": [
4218
{
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"
110-
}
111-
},
112-
"oauth_client": [],
113-
"api_key": [
114-
{
115-
"current_key": "AIzaSyBFXAfVr6kkFJdDNOm8U-c7iju0qIUkc_A"
116-
}
117-
],
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": [],
137-
"api_key": [
138-
{
139-
"current_key": "AIzaSyBFXAfVr6kkFJdDNOm8U-c7iju0qIUkc_A"
19+
"current_key": "Put here your value"
14020
}
14121
],
14222
"services": {
14323
"appinvite_service": {
14424
"other_platform_oauth_client": [
14525
{
146-
"client_id": "247738611464-v2nvd29bmqum7niosnfuh28oq3beh9f6.apps.googleusercontent.com",
26+
"client_id": "Put here your value",
14727
"client_type": 3
14828
}
14929
]

sample-chat-kotlin/app/proguard-rules.pro

+4-1
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,7 @@
4343
-keep class com.bumptech.** { *; }
4444

4545
#google gms
46-
-keep class com.google.android.gms.** { *; }
46+
-keep class com.google.android.gms.** { *; }
47+
48+
#json
49+
-keep class org.json.** { *; }

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

+4-5
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import com.quickblox.auth.session.QBSettings
66
import com.quickblox.sample.chat.kotlin.managers.BackgroundListener
77
import com.quickblox.sample.chat.kotlin.utils.ActivityLifecycle
88

9-
//Chat settings
9+
// chat settings
1010
const val USER_DEFAULT_PASSWORD = "quickblox"
1111
const val CHAT_PORT = 5223
1212
const val SOCKET_TIMEOUT = 300
@@ -17,20 +17,19 @@ const val AUTO_MARK_DELIVERED: Boolean = true
1717
const val RECONNECTION_ALLOWED: Boolean = true
1818
const val ALLOW_LISTEN_NETWORK: Boolean = true
1919

20-
//App credentials
20+
// app credentials
2121
private const val APPLICATION_ID = ""
2222
private const val AUTH_KEY = ""
2323
private const val AUTH_SECRET = ""
2424
private const val ACCOUNT_KEY = ""
2525

26-
//Chat credentials range
26+
// chat credentials range
2727
private const val MAX_PORT_VALUE = 65535
2828
private const val MIN_PORT_VALUE = 1000
2929
private const val MIN_SOCKET_TIMEOUT = 300
3030
private const val MAX_SOCKET_TIMEOUT = 60000
3131

3232
class App : Application() {
33-
3433
companion object {
3534
private lateinit var instance: App
3635

@@ -65,7 +64,7 @@ class App : Application() {
6564
QBSettings.getInstance().init(applicationContext, APPLICATION_ID, AUTH_KEY, AUTH_SECRET)
6665
QBSettings.getInstance().accountKey = ACCOUNT_KEY
6766

68-
// Uncomment and put your Api and Chat servers endpoints if you want to point the sample
67+
// uncomment and put your Api and Chat servers endpoints if you want to point the sample
6968
// against your own server.
7069
//
7170
// QBSettings.getInstance().setEndpoints("https://your_api_endpoint.com", "your_chat_endpoint", ServiceZone.PRODUCTION);

sample-chat-kotlin/app/src/main/java/com/quickblox/sample/chat/kotlin/utils/NotificationUtils.kt

+5-1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ object NotificationUtils {
5656
val intent = Intent(context, activityClass)
5757
intent.putExtra(EXTRA_FCM_MESSAGE, message)
5858
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
59-
return PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT)
59+
var intentFlag = 0
60+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
61+
intentFlag = PendingIntent.FLAG_IMMUTABLE
62+
}
63+
return PendingIntent.getActivity(context, 0, intent, intentFlag)
6064
}
6165
}

sample-chat-kotlin/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ext {
2626
dimensionDefault = 'default'
2727

2828
// QuickBlox SDK version
29-
qbSdkVersion = '3.9.15'
29+
qbSdkVersion = '3.10.1'
3030

3131
//Kotlin
3232
kotlinGradlePluginVersion = '1.5.31'

0 commit comments

Comments
 (0)