feat: add branded app and web icons
Add adaptive and legacy launcher icons for Android. Replace the default notification icon with a branded monochrome asset. Add favicon, touch icons, and a web app manifest for the web client.
@@ -13,9 +13,9 @@
|
||||
android:name=".MessengerApplication"
|
||||
android:allowBackup="true"
|
||||
android:enableOnBackInvokedCallback="true"
|
||||
android:icon="@android:drawable/sym_def_app_icon"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@android:drawable/sym_def_app_icon"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:usesCleartextTraffic="true"
|
||||
android:theme="@style/Theme.Messenger">
|
||||
|
||||
@@ -89,7 +89,7 @@ class NotificationDispatcher @Inject constructor(
|
||||
state.lines.reversed().forEach { inboxStyle.addLine(it) }
|
||||
|
||||
val notification = NotificationCompat.Builder(context, channelId)
|
||||
.setSmallIcon(android.R.drawable.ic_dialog_info)
|
||||
.setSmallIcon(R.drawable.ic_notification_small)
|
||||
.setContentTitle(state.title)
|
||||
.setContentText(contentText)
|
||||
.setStyle(inboxStyle)
|
||||
@@ -154,7 +154,7 @@ class NotificationDispatcher @Inject constructor(
|
||||
inboxStyle.addLine(line)
|
||||
}
|
||||
val summary = NotificationCompat.Builder(context, NotificationChannels.CHANNEL_MESSAGES)
|
||||
.setSmallIcon(android.R.drawable.ic_dialog_info)
|
||||
.setSmallIcon(R.drawable.ic_notification_small)
|
||||
.setContentTitle("Benya Messenger")
|
||||
.setContentText("$totalUnread new messages in ${snapshot.size} chats")
|
||||
.setStyle(inboxStyle)
|
||||
|
||||
24
android/app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
@@ -0,0 +1,24 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<group
|
||||
android:pivotX="54"
|
||||
android:pivotY="54"
|
||||
android:scaleX="0.72"
|
||||
android:scaleY="0.72">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M31,19C23.268,19 17,25.268 17,33v29c0,7.732 6.268,14 14,14h13.2L40,91l21.5,-15H77c7.732,0 14,-6.268 14,-14V33c0,-7.732 -6.268,-14 -14,-14H31z" />
|
||||
<path
|
||||
android:fillColor="#1E6FC1"
|
||||
android:pathData="M37,38m0,5a5,5 0,1 1,0 -10h34a5,5 0,1 1,0 10H37z" />
|
||||
<path
|
||||
android:fillColor="#1E6FC1"
|
||||
android:pathData="M37,52m0,5a5,5 0,1 1,0 -10h22a5,5 0,1 1,0 10H37z" />
|
||||
<path
|
||||
android:fillColor="#1E6FC1"
|
||||
android:pathData="M37,66m0,5a5,5 0,1 1,0 -10h14a5,5 0,1 1,0 10H37z" />
|
||||
</group>
|
||||
</vector>
|
||||
15
android/app/src/main/res/drawable/ic_launcher_monochrome.xml
Normal file
@@ -0,0 +1,15 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<group
|
||||
android:pivotX="54"
|
||||
android:pivotY="54"
|
||||
android:scaleX="0.72"
|
||||
android:scaleY="0.72">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M31,19C23.268,19 17,25.268 17,33v29c0,7.732 6.268,14 14,14h13.2L40,91l21.5,-15H77c7.732,0 14,-6.268 14,-14V33c0,-7.732 -6.268,-14 -14,-14H31z" />
|
||||
</group>
|
||||
</vector>
|
||||
@@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M6,2C4.343,2 3,3.343 3,5v8c0,1.657 1.343,3 3,3h1v4l4,-4h7c1.657,0 3,-1.343 3,-3V5c0,-1.657 -1.343,-3 -3,-3H6z" />
|
||||
</vector>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@color/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
|
||||
</adaptive-icon>
|
||||
BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 756 B |
BIN
android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 883 B |
BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 545 B |
BIN
android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 631 B |
BIN
android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 1004 B |
BIN
android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
BIN
android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="ic_launcher_background">#3390EC</color>
|
||||
</resources>
|
||||
@@ -3,6 +3,12 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="theme-color" content="#3390ec" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
|
||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png" />
|
||||
<link rel="manifest" href="/site.webmanifest" />
|
||||
<title>Benya Messenger</title>
|
||||
</head>
|
||||
<body class="bg-bg text-text">
|
||||
|
||||
BIN
web/public/android-chrome-192x192.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
web/public/android-chrome-512x512.png
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
web/public/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
web/public/favicon-16x16.png
Normal file
|
After Width: | Height: | Size: 266 B |
BIN
web/public/favicon-32x32.png
Normal file
|
After Width: | Height: | Size: 430 B |
BIN
web/public/favicon.ico
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
13
web/public/favicon.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" fill="none">
|
||||
<defs>
|
||||
<linearGradient id="bg" x1="256" y1="0" x2="256" y2="512" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#3390EC"/>
|
||||
<stop offset="1" stop-color="#1E6FC1"/>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="512" height="512" rx="116" fill="url(#bg)"/>
|
||||
<path d="M154 92C110.922 92 76 126.922 76 170V276C76 319.078 110.922 354 154 354H224.5L210 431L303 354H358C401.078 354 436 319.078 436 276V170C436 126.922 401.078 92 358 92H154Z" fill="white"/>
|
||||
<rect x="176" y="164" width="184" height="32" rx="16" fill="#1E6FC1"/>
|
||||
<rect x="176" y="236" width="112" height="32" rx="16" fill="#1E6FC1"/>
|
||||
<rect x="176" y="308" width="72" height="32" rx="16" fill="#1E6FC1"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 772 B |
19
web/public/site.webmanifest
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "Benya Messenger",
|
||||
"short_name": "Benya",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#3390ec",
|
||||
"background_color": "#0e1621",
|
||||
"display": "standalone"
|
||||
}
|
||||