Notification icon with lightning bolt, wording

This commit is contained in:
Philipp Heckel 2021-11-15 09:05:03 -05:00
parent ce6a2152db
commit a44e551809
4 changed files with 132 additions and 2 deletions

View file

@ -241,7 +241,7 @@ class SubscriberService : Service() {
PendingIntent.getActivity(this, 0, notificationIntent, 0)
}
return NotificationCompat.Builder(this, NOTIFICATION_CHANNEL_ID)
.setSmallIcon(R.drawable.ic_notification_icon)
.setSmallIcon(R.drawable.ic_notification_instant)
.setContentTitle(title)
.setContentText(text)
.setContentIntent(pendingIntent)

View file

@ -0,0 +1,25 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="50.270832dp"
android:height="50.270832dp"
android:viewportWidth="50.270832"
android:viewportHeight="50.270832">
<path
android:pathData="m10.2906,32.0419l0,-3.4747l8.2553,-3.864q0.3985,-0.1798 0.7686,-0.2696 0.3985,-0.1197 0.7117,-0.1798 0.3416,-0.0299 0.6832,-0.0599l0,-0.2397q-0.3416,-0.0299 -0.6832,-0.1197 -0.3131,-0.0599 -0.7117,-0.1499 -0.3701,-0.1197 -0.7686,-0.2995l-8.2553,-3.864l0,-3.5046l12.753,6.1405l0,3.7442z"
android:strokeWidth="0.38733381"
android:fillColor="#ffffff"
android:strokeColor="#00000000"/>
<path
android:pathData="m9.9609,15.4729l0,4.2725l8.4501,3.957 0.005,0.0053c0.2753,0.1242 0.542,0.2264 0.8013,0.3103l0.0148,0.0053l0.0148,0c0.0565,0.0132 0.0984,0.0185 0.1524,0.031 -0.0623,0.0185 -0.1116,0.027 -0.177,0.0466 -0.2626,0.0651 -0.5313,0.1605 -0.8062,0.2845l-0.005,0l-8.4501,3.957l0,4.2415l0.467,-0.2275 12.9479,-6.2329l0,-4.1898zM10.6196,16.5539 L22.7122,22.3782l0,3.3001l-12.0926,5.8243l0,-2.7104l8.0568,-3.7708c0.2499,-0.1128 0.4879,-0.1936 0.7128,-0.2481l0.0098,0l0.005,-0.0053c0.2521,-0.0757 0.4764,-0.1282 0.6685,-0.1655 0.0043,-0.0008 0.0106,-0.0053 0.0148,-0.0053l0.9536,-0.0826l0,-0.8793l-0.3048,-0.0265c-0.2096,-0.0185 -0.4183,-0.0583 -0.6292,-0.1139l-0.0098,0l-0.0098,-0.0053c-0.1958,-0.0373 -0.4237,-0.0834 -0.6735,-0.1396 -0.2327,-0.0752 -0.478,-0.1698 -0.7324,-0.2845l-0.005,0l-8.0568,-3.7708z"
android:strokeWidth="0.38733381"
android:fillColor="#ffffff"
android:strokeColor="#00000000"/>
<path
android:pathData="m0.8486,6.2382v1.9337,36.9786h32.4947l0.5519,-3.8654L4.714,41.2851L4.714,10.1036h40.9748v15.3918h3.6484c0.069,0 0.1432,0.003 0.2165,0.005L49.5536,6.2383ZM49.5536,34.5496c-2.3656,4.1288 -4.5102,7.8727 -6.0709,10.6009h6.0709z"
android:strokeWidth="1"
android:fillColor="#ffffff"/>
<path
android:pathData="m40.7092,16.7466c-4.1394,7.2567 -7.8235,13.7146 -10.2159,17.9374h8.5829l-1.8531,12.962c1.2024,-2.1043 3.8969,-6.8095 10.2878,-17.9601h-8.6543z"
android:strokeWidth="1"
android:fillColor="#ffffff"
android:strokeColor="#00000000"/>
</vector>

View file

@ -67,7 +67,7 @@
<string name="detail_copied_to_clipboard_message">Copied to clipboard</string>
<string name="detail_instant_delivery_enabled">Instant delivery enabled</string>
<string name="detail_instant_delivery_disabled">Instant delivery disabled</string>
<string name="detail_instant_info">Instant delivery is always enabled for subscriptions with other servers</string>
<string name="detail_instant_info">Instant delivery cannot be disabled for subscriptions from other servers</string>
<!-- Detail activity: Action bar -->
<string name="detail_menu_test">Send test notification</string>

View file

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="50.270832mm"
height="50.270832mm"
viewBox="0 0 50.270832 50.270832"
version="1.1"
id="svg8"
inkscape:version="1.1.1 (3bf5ae0, 2021-09-20)"
sodipodi:docname="notification_instant.svg"
inkscape:export-filename="/home/pheckel/Code/ntfy-android/assets/notification.png"
inkscape:export-xdpi="258.69"
inkscape:export-ydpi="258.69"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#505050"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="3.2922024"
inkscape:cx="108.28617"
inkscape:cy="72.899528"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:measure-start="0,0"
inkscape:measure-end="0,0"
inkscape:snap-text-baseline="true"
inkscape:window-width="1863"
inkscape:window-height="1025"
inkscape:window-x="57"
inkscape:window-y="27"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
showguides="true"
inkscape:guide-bbox="true"
inkscape:pagecheckerboard="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="foreground"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-51.147327,-81.515579)"
style="display:inline">
<g
id="path1011-3-5"
transform="matrix(2.5168336,0,0,2.6483458,-96.041466,-195.68997)"
style="font-size:8.48274px;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;display:inline;fill:#ffffff;stroke:#ffffff;stroke-width:0.38733381;stroke-miterlimit:4;stroke-dasharray:none">
<path
style="color:#000000;-inkscape-font-specification:'JetBrains Mono, Bold';fill:#ffffff;stroke:none;stroke-width:0.38733381;stroke-miterlimit:4;stroke-dasharray:none"
d="m 62.57046,116.77004 v -1.31201 l 3.280018,-1.45904 q 0.158346,-0.0679 0.305381,-0.1018 0.158346,-0.0452 0.282761,-0.0679 0.135725,-0.0113 0.271449,-0.0226 v -0.0905 q -0.135724,-0.0113 -0.271449,-0.0452 -0.124415,-0.0226 -0.282761,-0.0566 -0.147035,-0.0452 -0.305381,-0.1131 l -3.280018,-1.45904 v -1.32332 l 5.067063,2.31863 v 1.4138 z"
id="path1213-5-9" />
<path
style="color:#000000;-inkscape-font-specification:'JetBrains Mono, Bold';fill:#ffffff;stroke:none;stroke-width:0.38733381;stroke-miterlimit:4;stroke-dasharray:none"
d="m 62.439453,110.51367 v 1.61328 l 3.357422,1.49414 0.002,0.002 c 0.1094,0.0469 0.215332,0.0855 0.318359,0.11718 l 0.0059,0.002 h 0.0059 c 0.02244,0.005 0.03909,0.007 0.06055,0.0117 -0.02475,0.007 -0.04436,0.0102 -0.07031,0.0176 -0.104318,0.0246 -0.211081,0.0606 -0.320313,0.10743 h -0.002 l -3.357422,1.49414 v 1.60156 l 0.185547,-0.0859 5.144531,-2.35351 v -1.58203 z m 0.261719,0.40821 4.804687,2.19921 v 1.2461 l -4.804687,2.19922 v -1.02344 l 3.201172,-1.42383 c 0.0993,-0.0426 0.193839,-0.0731 0.283203,-0.0937 h 0.0039 l 0.002,-0.002 c 0.100152,-0.0286 0.189304,-0.0484 0.265625,-0.0625 0.0017,-3.2e-4 0.0042,-0.002 0.0059,-0.002 l 0.378906,-0.0312 v -0.33203 l -0.121094,-0.01 c -0.08326,-0.007 -0.166182,-0.022 -0.25,-0.043 h -0.0039 l -0.0039,-0.002 c -0.0778,-0.0141 -0.168362,-0.0315 -0.267579,-0.0527 -0.09247,-0.0284 -0.189935,-0.0641 -0.291015,-0.10742 h -0.002 l -3.201172,-1.42383 z"
id="path1215-6-2" />
</g>
<path
id="rect849-7-2"
style="color:#000000;display:inline;fill:#ffffff;stroke-width:1;-inkscape-stroke:none"
d="m 51.995933,87.753738 v 1.933733 36.978649 h 32.494652 l 0.55191,-3.86541 H 55.861328 V 91.619141 h 40.974757 v 15.391819 h 3.648355 c 0.069,0 0.14316,0.003 0.21652,0.005 V 87.753843 Z m 48.705027,28.311452 c -2.365575,4.12885 -4.510165,7.87275 -6.070935,10.60093 h 6.070945 z" />
<path
id="path6295"
style="color:#000000;display:inline;fill:#ffffff;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none"
d="m 91.856545,98.262141 c -4.13939,7.256679 -7.82348,13.714569 -10.21591,17.937429 h 8.58294 l -1.85312,12.96199 c 1.20239,-2.10426 3.89686,-6.80945 10.28775,-17.96015 h -8.65426 z" />
</g>
<g
inkscape:groupmode="layer"
id="g18852"
inkscape:label="round icon preview"
style="display:none">
<path
id="path18850"
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke-width:0.999999"
d="M 0,0 V 190 H 84.177734 A 95.321232,95.321232 0 0 1 0.03320312,95.402344 95.321232,95.321232 0 0 1 95.353516,0.08007812 95.321232,95.321232 0 0 1 190,84.138672 V 0 Z M 190,106.1543 A 95.321232,95.321232 0 0 1 106.53125,190 H 190 Z"
transform="scale(0.26458333)"
inkscape:export-filename="/home/pheckel/Code/ntfy-android/assets/notification.png"
inkscape:export-xdpi="258.69"
inkscape:export-ydpi="258.69" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 5.5 KiB