Keep alarm notification on screen
If the user picks up their phone late while the alarm is going, they might not realise the controls are in the notification not the app. Closes #75
This commit is contained in:
parent
e2c790870b
commit
e501276463
|
@ -6,6 +6,7 @@
|
||||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />
|
||||||
|
<uses-permission android:name="android.permission.USE_FULL_SCREEN_INTENT" />
|
||||||
<uses-permission tools:node="remove" android:name="android.permission.ACCESS_NETWORK_STATE" />
|
<uses-permission tools:node="remove" android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
|
|
|
@ -80,10 +80,10 @@ class TimerService() : Service() {
|
||||||
PendingIntent.FLAG_IMMUTABLE
|
PendingIntent.FLAG_IMMUTABLE
|
||||||
)
|
)
|
||||||
builder.setContentText("Timer finished.")
|
builder.setContentText("Timer finished.")
|
||||||
.setAutoCancel(true)
|
|
||||||
.setProgress(0, 0, false)
|
.setProgress(0, 0, false)
|
||||||
.setOngoing(false)
|
.setAutoCancel(true)
|
||||||
.setContentIntent(finishPending)
|
.setOngoing(true)
|
||||||
|
.setFullScreenIntent(finishPending, true)
|
||||||
.setChannelId(CHANNEL_ID_DONE)
|
.setChannelId(CHANNEL_ID_DONE)
|
||||||
.setCategory(NotificationCompat.CATEGORY_ALARM)
|
.setCategory(NotificationCompat.CATEGORY_ALARM)
|
||||||
.setDeleteIntent(pendingStop)
|
.setDeleteIntent(pendingStop)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user