mirror of
https://github.com/home-assistant/android
synced 2024-10-01 13:53:53 +00:00
Fix notification icon
This commit is contained in:
parent
20cc710490
commit
42d380589f
|
@ -54,7 +54,7 @@
|
|||
|
||||
<meta-data
|
||||
android:name="com.google.firebase.messaging.default_notification_icon"
|
||||
android:resource="@drawable/ic_launcher_foreground" />
|
||||
android:resource="@drawable/ic_stat_ic_notification" />
|
||||
<meta-data
|
||||
android:name="com.google.firebase.messaging.default_notification_color"
|
||||
android:resource="@color/colorPrimary" />
|
||||
|
|
|
@ -9,6 +9,7 @@ import android.media.RingtoneManager
|
|||
import android.os.Build
|
||||
import android.util.Log
|
||||
import androidx.core.app.NotificationCompat
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.google.firebase.messaging.FirebaseMessagingService
|
||||
import com.google.firebase.messaging.RemoteMessage
|
||||
import io.homeassistant.companion.android.BuildConfig
|
||||
|
@ -77,7 +78,8 @@ class MessagingService : FirebaseMessagingService() {
|
|||
val channelId = "default"
|
||||
val defaultSoundUri = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION)
|
||||
val notificationBuilder = NotificationCompat.Builder(this, channelId)
|
||||
.setSmallIcon(R.drawable.ic_launcher_foreground)
|
||||
.setSmallIcon(R.drawable.ic_stat_ic_notification)
|
||||
.setColor(ContextCompat.getColor(this, R.color.colorPrimary))
|
||||
.setContentTitle(messageTitle)
|
||||
.setContentText(messageBody)
|
||||
.setAutoCancel(true)
|
||||
|
|
BIN
app/src/main/res/drawable-hdpi/ic_stat_ic_notification.png
Normal file
BIN
app/src/main/res/drawable-hdpi/ic_stat_ic_notification.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 934 B |
BIN
app/src/main/res/drawable-mdpi/ic_stat_ic_notification.png
Normal file
BIN
app/src/main/res/drawable-mdpi/ic_stat_ic_notification.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 620 B |
BIN
app/src/main/res/drawable-xhdpi/ic_stat_ic_notification.png
Normal file
BIN
app/src/main/res/drawable-xhdpi/ic_stat_ic_notification.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/drawable-xxhdpi/ic_stat_ic_notification.png
Normal file
BIN
app/src/main/res/drawable-xxhdpi/ic_stat_ic_notification.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/drawable-xxxhdpi/ic_stat_ic_notification.png
Normal file
BIN
app/src/main/res/drawable-xxxhdpi/ic_stat_ic_notification.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
Loading…
Reference in a new issue