Skip to content

Commit 80865ab

Browse files
committed
Fix foreground service notification icon (use vector drawable instead of adaptive mipmap)
1 parent 303fe1c commit 80865ab

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

work_timer/android/app/src/main/kotlin/com/utsapoddar/sift/TimerService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class TimerService : Service() {
6161
return NotificationCompat.Builder(this, CHANNEL_ID)
6262
.setContentTitle("Sift")
6363
.setContentText("Timer running")
64-
.setSmallIcon(R.mipmap.ic_launcher)
64+
.setSmallIcon(R.drawable.ic_notification)
6565
.setOngoing(true)
6666
.addAction(0, "Stop", stopPi)
6767
.addAction(0, "Silence", silencePi)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
3+
android:width="24dp"
4+
android:height="24dp"
5+
android:viewportWidth="24"
6+
android:viewportHeight="24">
7+
<path
8+
android:fillColor="#FFFFFF"
9+
android:pathData="M11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8zM12.5,7H11v6l5.25,3.15 0.75,-1.23 -4.5,-2.67z"/>
10+
</vector>

0 commit comments

Comments
 (0)