Commit 377c5368 authored by wanglei's avatar wanglei

...

parent fbfdfe55
......@@ -26,7 +26,7 @@ object AlarmUtils {
calendar.set(Calendar.SECOND, 0)
var delay = 1800000L
if (BuildConfig.DEBUG) {
delay = 5000L
delay = 1800000L
}
alarmManager.setRepeating(
AlarmManager.RTC_WAKEUP, calendar.timeInMillis, delay, pendingIntent
......
......@@ -98,7 +98,7 @@ class StayJobService : JobService() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
val channel =
NotificationChannel(channelId, channelName, NotificationManager.IMPORTANCE_HIGH)
NotificationChannel(channelId, channelName, NotificationManager.IMPORTANCE_LOW)
channel.lockscreenVisibility = 1
val notificationManager =
context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
......@@ -132,12 +132,12 @@ class StayJobService : JobService() {
}
private fun notifyForeground() {
LogEx.logDebug(TAG, "notifyForeground")
val notificationManager =
getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
notificationManager.notify(
NOTIFICATION_PERMANENT_ID,
createPermanentNotification(applicationContext)
NOTIFICATION_PERMANENT_ID, createPermanentNotification(applicationContext)
)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment