Bump, re-add foreground service
This commit is contained in:
parent
107056cf49
commit
c72ed10cab
3 changed files with 9 additions and 4 deletions
|
|
@ -18,12 +18,12 @@ android {
|
|||
minSdkVersion 21
|
||||
targetSdkVersion 35
|
||||
|
||||
versionCode 34
|
||||
versionName "1.17.1"
|
||||
versionCode 35
|
||||
versionName "1.17.2"
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
/* Required for Room schema migrations */
|
||||
/* Required for Room schema migrations */
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments += ["room.schemaLocation": "$projectDir/schemas".toString()]
|
||||
|
|
|
|||
|
|
@ -94,6 +94,11 @@
|
|||
android:exported="false">
|
||||
</activity>
|
||||
|
||||
<!-- Subscriber foreground service for hosts other than ntfy.sh -->
|
||||
<service
|
||||
android:name=".service.SubscriberService"
|
||||
android:foregroundServiceType="remoteMessaging"/>
|
||||
|
||||
<!-- Subscriber service restart on reboot -->
|
||||
<receiver
|
||||
android:name=".service.SubscriberService$BootStartReceiver"
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ class SubscriberService : Service() {
|
|||
serviceNotification = createNotification(title, text)
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
|
||||
startForeground(NOTIFICATION_SERVICE_ID, serviceNotification!!, ServiceInfo.FOREGROUND_SERVICE_TYPE_SPECIAL_USE)
|
||||
startForeground(NOTIFICATION_SERVICE_ID, serviceNotification!!, ServiceInfo.FOREGROUND_SERVICE_TYPE_REMOTE_MESSAGING)
|
||||
} else {
|
||||
startForeground(NOTIFICATION_SERVICE_ID, serviceNotification)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue