diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 1fe8a7535..bb62e6213 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -22,6 +22,7 @@ -keep class dev.jahir.frames.** { *; } +-keep class androidx.core.app.CoreComponentFactory { *; } -keep class com.google.** -keep class autovalue.shaded.com.google.** -keep class com.android.vending.billing.** diff --git a/app/src/main/kotlin/dev/jahir/frames/app/MyApplication.kt b/app/src/main/kotlin/dev/jahir/frames/app/MyApplication.kt index 93487c9ee..db62bc46e 100644 --- a/app/src/main/kotlin/dev/jahir/frames/app/MyApplication.kt +++ b/app/src/main/kotlin/dev/jahir/frames/app/MyApplication.kt @@ -1,11 +1,10 @@ package dev.jahir.frames.app -import dev.jahir.frames.ui.FramesApplication - // TODO: Remove comment marks to enable -// import com.onesignal.OneSignal // import com.onesignal.OSNotificationReceivedEvent +// import com.onesignal.OneSignal // import dev.jahir.frames.extensions.context.preferences +import dev.jahir.frames.ui.FramesApplication class MyApplication : FramesApplication(BuildConfig.ONESIGNAL_APP_ID) { override fun onCreate() { @@ -26,6 +25,6 @@ class MyApplication : FramesApplication(BuildConfig.ONESIGNAL_APP_ID) { OneSignal.unsubscribeWhenNotificationsAreDisabled(true) OneSignal.pauseInAppMessages(true) OneSignal.setLocationShared(false) - */ + */ } } diff --git a/app/src/main/kotlin/dev/jahir/frames/app/NotificationServiceExtension.kt b/app/src/main/kotlin/dev/jahir/frames/app/NotificationServiceExtension.kt index abb8b79ee..278e181af 100644 --- a/app/src/main/kotlin/dev/jahir/frames/app/NotificationServiceExtension.kt +++ b/app/src/main/kotlin/dev/jahir/frames/app/NotificationServiceExtension.kt @@ -2,29 +2,30 @@ package dev.jahir.frames.app /* TODO: Remove comment marks to enable import android.content.Context -import androidx.core.app.NotificationCompat import com.onesignal.OSNotificationReceivedEvent import com.onesignal.OneSignal.OSRemoteNotificationReceivedHandler +import dev.jahir.frames.app.R import dev.jahir.frames.extensions.context.color -import dev.jahir.frames.extensions.context.drawable -import dev.jahir.frames.extensions.context.preferences import dev.jahir.frames.extensions.context.hasNotificationsPermission +import dev.jahir.frames.extensions.context.preferences class NotificationServiceExtension : OSRemoteNotificationReceivedHandler { override fun remoteNotificationReceived( context: Context, notificationReceivedEvent: OSNotificationReceivedEvent ) { - if(!context.preferences.notificationsEnabled || !context.hasNotificationsPermission) { + if (!context.preferences.notificationsEnabled || !context.hasNotificationsPermission) { notificationReceivedEvent.complete(null) return } val notification = notificationReceivedEvent.notification val mutableNotification = notification.mutableCopy() - mutableNotification.setExtender { builder: NotificationCompat.Builder -> - builder.color = context.color(R.color.accent) - builder.setSmallIcon(R.drawable.ic_notification) + mutableNotification.setExtender { extender -> + extender.apply { + color = context.color(R.color.accent) + setSmallIcon(R.drawable.ic_notification) + } } notificationReceivedEvent.complete(mutableNotification) } diff --git a/app/src/main/res/drawable/ic_notification.xml b/app/src/main/res/drawable/ic_notification.xml new file mode 100755 index 000000000..0b0ae69d7 --- /dev/null +++ b/app/src/main/res/drawable/ic_notification.xml @@ -0,0 +1,17 @@ + + + + + \ No newline at end of file diff --git a/buildSrc/src/main/java/MyApp.kt b/buildSrc/src/main/java/MyApp.kt index 29f05ab65..9bab521b3 100644 --- a/buildSrc/src/main/java/MyApp.kt +++ b/buildSrc/src/main/java/MyApp.kt @@ -2,6 +2,6 @@ object MyApp { const val appId = "dev.jahir.frames.app" - const val version = 358 - const val versionName = "3.5.8" + const val version = 360 + const val versionName = "3.6.0" } diff --git a/buildSrc/src/main/java/Versions.kt b/buildSrc/src/main/java/Versions.kt index d98876a28..5c9929f88 100644 --- a/buildSrc/src/main/java/Versions.kt +++ b/buildSrc/src/main/java/Versions.kt @@ -2,12 +2,12 @@ object Versions { // Plugins - const val gradle = "8.1.1" - const val kotlin = "1.9.10" - const val ksp = "$kotlin-1.0.13" + const val gradle = "8.2.0" + const val kotlin = "1.9.22" + const val ksp = "$kotlin-1.0.16" // OneSignal - const val oneSignal = "4.8.6" + const val oneSignal = "4.8.7" // App const val minSdk = 21 @@ -15,5 +15,5 @@ object Versions { const val buildTools = "34.0.0" // Frames - const val frames = "3.5.8" + const val frames = "3.6.0" }