diff --git a/app/build.gradle.kts b/app/build.gradle.kts index a4376e3..3b7c324 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -17,7 +17,7 @@ android { applicationId = "be.mygod.pogoplusplus" minSdk = 28 targetSdk = 35 - versionCode = 34 + versionCode = 35 versionName = "1.3.7" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" } diff --git a/app/src/main/java/be/mygod/pogoplusplus/GameNotificationService.kt b/app/src/main/java/be/mygod/pogoplusplus/GameNotificationService.kt index f6f5594..d249c96 100644 --- a/app/src/main/java/be/mygod/pogoplusplus/GameNotificationService.kt +++ b/app/src/main/java/be/mygod/pogoplusplus/GameNotificationService.kt @@ -187,7 +187,7 @@ class GameNotificationService : NotificationListenerService() { if (BluetoothPairingService.instance?.onNotification(sbn.notification, sbn.packageName) == true || !isInterested(sbn)) return val text = sbn.notification.extras.getString(Notification.EXTRA_TEXT) - Timber.d("PGP notification updated @ ${sbn.postTime}: $text") + Timber.d("PGP notification updated @ ${sbn.postTime} (${sbn.notification.flags}): $text") if (text.isNullOrEmpty()) { updateConnectionStatus(SfidaSessionManager.onConnect()) return setTimeoutIfEnabled() @@ -200,10 +200,10 @@ class GameNotificationService : NotificationListenerService() { if (text == resources.findString("Disconnecting_Companion_Device", sbn.packageName)) { return onAuxiliaryDisconnected() } - val shouldUpdate = (Build.VERSION.SDK_INT >= 31 || sbn.notification.flags and - Notification.FLAG_FOREGROUND_SERVICE == Notification.FLAG_FOREGROUND_SERVICE) && - SfidaManager.isConnected != false + val shouldUpdate = SfidaManager.isConnected != false if (shouldUpdate) setTimeoutIfEnabled() + if (Build.VERSION.SDK_INT < 31 && sbn.notification.flags and Notification.FLAG_FOREGROUND_SERVICE != + Notification.FLAG_FOREGROUND_SERVICE) return // ignore reposted notification var str = resources.findString("Item_Inventory_Full", sbn.packageName) if (text == str) return pushNotification(NOTIFICATION_ITEM_FULL, CHANNEL_ITEM_FULL, str, R.drawable.ic_action_shopping_bag, sbn.packageName) { diff --git a/build.gradle.kts b/build.gradle.kts index b7d05e4..11b07e5 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("com.android.application") version "8.6.0" apply false + id("com.android.application") version "8.6.1" apply false id("com.github.ben-manes.versions") version "0.51.0" id("com.google.firebase.crashlytics") version "3.0.2" apply false id("com.google.gms.google-services") version "4.4.2" apply false