Skip to content

Commit 5d97b2e

Browse files
committed
Fixing reported crash on Play Console (likely missing IMMUTABLE flag in creating PendingIntent for notification)
1 parent fcdbaee commit 5d97b2e

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

app/build.gradle

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ android {
1010
applicationId "com.jvdegithub.aiscatcher"
1111
minSdk 22
1212
targetSdk 32
13-
versionCode 10
14-
versionName '0.17'
13+
versionCode 11
14+
versionName '0.18'
1515

1616
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
1717
externalNativeBuild {
@@ -55,11 +55,11 @@ android {
5555

5656
dependencies {
5757

58-
implementation 'androidx.appcompat:appcompat:1.4.1'
59-
implementation 'com.google.android.material:material:1.6.0'
60-
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
61-
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.1'
62-
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'
58+
implementation 'androidx.appcompat:appcompat:1.5.0'
59+
implementation 'com.google.android.material:material:1.6.1'
60+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
61+
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.1'
62+
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
6363
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
6464
implementation 'androidx.preference:preference:1.2.0'
6565
testImplementation 'junit:junit:4.13.2'

app/src/main/java/com/jvdegithub/aiscatcher/AisService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ private Notification buildNotification(String msg) {
7474
}
7575

7676
Intent notificationIntent = new Intent(this.getApplicationContext(), MainActivity.class);
77-
PendingIntent contentIntent = PendingIntent.getActivity(this.getApplicationContext(), 0, notificationIntent, 0);
77+
PendingIntent contentIntent = PendingIntent.getActivity(this.getApplicationContext(), 0, notificationIntent, PendingIntent.FLAG_IMMUTABLE);
7878

7979
notification.setContentIntent(contentIntent)
8080
.setContentText(msg)

app/src/main/jni/JNI/AIScatcherNDK.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ Java_com_jvdegithub_aiscatcher_AisCatcherJava_InitNative(JNIEnv *env, jclass ins
268268
javaVersion = env->GetVersion();
269269
javaClass = (jclass) env->NewGlobalRef(instance);
270270

271-
callbackConsole(env, "AIS-Catcher " VERSION "-17\n");
271+
callbackConsole(env, "AIS-Catcher " VERSION "-18\n");
272272
memset(&statistics, 0, sizeof(statistics));
273273

274274
return 0;

0 commit comments

Comments
 (0)