make a guaranteed non vector version of icon for older androids

This commit is contained in:
Kevin Hester
2021-02-04 08:20:43 +08:00
parent 4ea44095df
commit 55fd7c7330
5 changed files with 5 additions and 1 deletions

View File

@@ -73,7 +73,7 @@ class MeshServiceNotifications(
val builder = NotificationCompat.Builder(context, channelId).setOngoing(true)
.setPriority(NotificationCompat.PRIORITY_MIN)
.setCategory(category)
.setSmallIcon(R.drawable.app_icon)
.setSmallIcon(if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) R.drawable.app_icon_novect else R.drawable.app_icon) // vector form icons don't work reliably on older androids
.setContentTitle(summaryString) // leave this off for now so our notification looks smaller
.setVisibility(NotificationCompat.VISIBILITY_PUBLIC)
.setContentIntent(openAppIntent)

View File

@@ -0,0 +1 @@
app_icon.png

View File

@@ -0,0 +1 @@
app_icon.png

View File

@@ -0,0 +1 @@
app_icon.png

View File

@@ -0,0 +1 @@
app_icon.png