Skip to content

Commit dcd21b2

Browse files
committed
4.0.2-push-java
1 parent 01c6621 commit dcd21b2

16 files changed

+70
-270
lines changed

sample-pushnotifications-java/app/build.gradle

+12-20
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,34 @@
11
buildscript {
22
repositories {
33
google()
4-
jcenter()
5-
maven { url 'https://maven.fabric.io/public' }
6-
}
7-
8-
dependencies {
9-
classpath "io.fabric.tools:gradle:$fabricToolsVersion"
4+
mavenCentral()
105
}
116
}
127

138
apply plugin: 'com.android.application'
14-
apply plugin: 'io.fabric'
159

1610
repositories {
1711
google()
18-
jcenter()
12+
mavenCentral()
1913
maven {
2014
url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/"
2115
}
22-
maven { url 'https://maven.fabric.io/public' }
23-
flatDir { dirs 'libs' }
2416
}
2517

18+
2619
android {
2720
def versionQACode = 1
2821

29-
compileSdkVersion 28
30-
buildToolsVersion "28.0.3"
22+
compileSdkVersion 31
23+
buildToolsVersion "31.0.0"
3124
flavorDimensions dimensionDefault
3225

3326
defaultConfig {
3427
applicationId "com.quickblox.sample.pushnotifications.java"
35-
minSdkVersion 14
36-
targetSdkVersion 28
37-
versionCode 401000
38-
versionName '4.0.1-java'
28+
minSdkVersion 21
29+
targetSdkVersion 31
30+
versionCode 402000
31+
versionName '4.0.2-java'
3932
multiDexEnabled true
4033
}
4134

@@ -59,12 +52,14 @@ android {
5952
minifyEnabled false
6053
shrinkResources false
6154
proguardFile 'proguard-rules.pro'
62-
zipAlignEnabled false
6355
resValue "string", "versionName", "QuickBlox Push Notifications Java\nBuild version " + defaultConfig.getVersionName()
6456
}
6557

6658
release {
6759
signingConfig signingConfigs.debug
60+
minifyEnabled true
61+
shrinkResources true
62+
proguardFile 'proguard-rules.pro'
6863
resValue "string", "versionName", "QuickBlox Push Notifications Java\nBuild version " + defaultConfig.getVersionName()
6964
}
7065
}
@@ -88,9 +83,6 @@ dependencies {
8883
implementation "com.google.firebase:firebase-core:$firebaseCoreVersion"
8984
implementation("com.google.android.material:material:$materialVersion")
9085
implementation "com.github.johnkil.android-robototextview:robototextview:$robotoTextViewVersion"
91-
implementation("com.crashlytics.sdk.android:crashlytics:$crashlyticsVersion@aar") {
92-
transitive = true
93-
}
9486
}
9587

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

sample-pushnotifications-java/app/google-services.json

+10-135
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",
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",
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",
11+
"mobilesdk_app_id": "Put here your value",
6012
"android_client_info": {
6113
"package_name": "com.quickblox.sample.pushnotifications.java"
6214
}
6315
},
64-
"oauth_client": [],
65-
"api_key": [
16+
"oauth_client": [
6617
{
67-
"current_key": "AIzaSyBFXAfVr6kkFJdDNOm8U-c7iju0qIUkc_A"
18+
"client_id": "Put here your value",
19+
"client_type": 3
6820
}
6921
],
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": [],
11322
"api_key": [
11423
{
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"
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,13 +1,11 @@
11
# Add project specific ProGuard rules here.
22
# By default, the flags in this file are appended to flags specified
3-
# in /home/tereha/Android/sdk/tools/proguard/proguard-android.txt
3+
44
# You can edit the include path and order by changing the proguardFiles
55
# directive in build.gradle.
66
#
77
# For more details, see
8-
# http://developer.android.com/guide/developing/tools/proguard.html
9-
10-
# Add any project specific keep options here:
8+
# http://developer.android.com/guide/developing/tools/proguard.html
119

1210
# If your project uses WebView with JS, uncomment the following
1311
# and specify the fully qualified class name to the JavaScript interface
@@ -23,48 +21,16 @@
2321
##---------------Begin: proguard configuration for Gson ----------
2422
# Gson uses generic type information stored in a class file when working with fields. Proguard
2523
# removes such information by default, so configure it to keep all of it.
24+
-keepattributes EnclosingMethod
25+
-keepattributes InnerClasses
2626
-keepattributes Signature
27+
-keepattributes Exceptions
2728

2829
# For using GSON @Expose annotation
2930
-keepattributes *Annotation*
3031

31-
# Gson specific classes
32-
-keep class sun.misc.Unsafe { *; }
33-
#-keep class com.google.gson.stream.** { *; }
34-
35-
# Application classes that will be serialized/deserialized over Gson
36-
-keep class com.quickblox.core.account.model.** { *; }
37-
38-
39-
##---------------End: proguard configuration for Gson ----------
40-
#quickblox sample chat
41-
42-
-keep class com.quickblox.auth.parsers.** { *; }
43-
-keep class com.quickblox.auth.model.** { *; }
44-
-keep class com.quickblox.core.parser.** { *; }
45-
-keep class com.quickblox.core.model.** { *; }
46-
-keep class com.quickblox.core.server.** { *; }
47-
-keep class com.quickblox.core.rest.** { *; }
48-
-keep class com.quickblox.core.error.** { *; }
49-
-keep class com.quickblox.core.Query { *; }
50-
51-
-keep class com.quickblox.users.parsers.** { *; }
52-
-keep class com.quickblox.users.model.** { *; }
53-
54-
-keep class com.quickblox.chat.parser.** { *; }
55-
-keep class com.quickblox.chat.model.** { *; }
56-
57-
-keep class com.quickblox.messages.parsers.** { *; }
58-
-keep class com.quickblox.messages.model.** { *; }
59-
60-
-keep class com.quickblox.content.parsers.** { *; }
61-
-keep class com.quickblox.content.model.** { *; }
62-
63-
-keep class org.jivesoftware.** { *; }
64-
65-
#sample chat
66-
-keep class android.support.v7.** { *; }
67-
-keep class com.bumptech.** { *; }
32+
#quickblox sdk
33+
-keep class com.quickblox.** { *; }
6834

69-
-dontwarn org.jivesoftware.smackx.**
70-
-dontwarn android.support.v4.app.**
35+
#google gms
36+
-keep class com.google.android.gms.** { *; }

sample-pushnotifications-java/app/src/main/AndroidManifest.xml

+7-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
<activity
2121
android:name=".activities.SplashActivity"
22+
android:exported="true"
2223
android:screenOrientation="portrait">
2324
<intent-filter>
2425
<action android:name="android.intent.action.MAIN" />
@@ -49,13 +50,17 @@
4950
</intent-filter>
5051
</service>
5152

52-
<service android:name="com.quickblox.messages.services.fcm.QBFcmPushListenerService">
53+
<service
54+
android:name="com.quickblox.messages.services.fcm.QBFcmPushListenerService"
55+
android:exported="false">
5356
<intent-filter>
5457
<action android:name="com.google.firebase.MESSAGING_EVENT" />
5558
</intent-filter>
5659
</service>
5760

58-
<service android:name="com.quickblox.messages.services.fcm.QBFcmPushInstanceIDService">
61+
<service
62+
android:name="com.quickblox.messages.services.fcm.QBFcmPushInstanceIDService"
63+
android:exported="false">
5964
<intent-filter>
6065
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
6166
</intent-filter>

sample-pushnotifications-java/app/src/main/java/com/quickblox/sample/pushnotifications/java/App.java

-12
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import android.text.TextUtils;
55
import android.util.Log;
66

7-
import com.crashlytics.android.Crashlytics;
87
import com.google.android.gms.common.GoogleApiAvailability;
98
import com.quickblox.auth.session.QBSession;
109
import com.quickblox.auth.session.QBSessionManager;
@@ -14,9 +13,6 @@
1413
import com.quickblox.sample.pushnotifications.java.utils.ActivityLifecycle;
1514
import com.quickblox.sample.pushnotifications.java.utils.ToastUtils;
1615

17-
import io.fabric.sdk.android.Fabric;
18-
19-
2016
public class App extends Application {
2117
private static final String TAG = App.class.getSimpleName();
2218

@@ -32,13 +28,11 @@ public class App extends Application {
3228
@Override
3329
public void onCreate() {
3430
super.onCreate();
35-
Fabric.with(this, new Crashlytics());
3631
instance = this;
3732
ActivityLifecycle.init();
3833
checkConfig();
3934
initCredentials();
4035
initQBSessionManager();
41-
initFabric();
4236
initPushManager();
4337
}
4438

@@ -119,12 +113,6 @@ public void onSubscriptionDeleted(boolean success) {
119113
});
120114
}
121115

122-
private void initFabric() {
123-
if (!BuildConfig.DEBUG) {
124-
Fabric.with(this, new Crashlytics());
125-
}
126-
}
127-
128116
public static synchronized App getInstance() {
129117
return instance;
130118
}

sample-pushnotifications-java/app/src/main/java/com/quickblox/sample/pushnotifications/java/activities/AppInfoActivity.java

-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@
1414
import com.quickblox.sample.pushnotifications.java.BuildConfig;
1515
import com.quickblox.sample.pushnotifications.java.R;
1616

17-
1817
public class AppInfoActivity extends BaseActivity {
19-
2018
private TextView appVersionTextView;
2119
private TextView sdkVersionTextView;
2220
private TextView appIDTextView;

0 commit comments

Comments
 (0)