ntfy/docs/subscribe/pwa.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

63 lines
3.8 KiB
Markdown
Raw Normal View History

2023-06-25 14:08:57 +12:00
# Using the progressive web app (PWA)
While ntfy doesn't have a native desktop app, it is built as a [progressive web app](https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps) (PWA)
2023-06-26 01:48:12 +12:00
and thus can be **installed on both desktop and mobile devices**.
2023-06-25 14:08:57 +12:00
This gives it its own launcher (e.g. shortcut on Windows, app on macOS, launcher shortcut on Linux, home screen icon on iOS, and
launcher icon on Android), a standalone window, push notifications, and an app badge with the unread notification count.
2023-06-26 01:48:12 +12:00
Web app installation is **supported on** (see [compatibility table](https://caniuse.com/web-app-manifest) for details):
2023-06-25 14:08:57 +12:00
- Chrome on all platforms (Windows/Linux/macOS/Android/iOS)
2023-06-26 01:48:12 +12:00
- Firefox on Android natively, and on Windows/Linux (only [via an extension](https://addons.mozilla.org/en-US/firefox/addon/pwas-for-firefox/))
2023-06-25 14:08:57 +12:00
- Edge on Windows
- Safari on macOS/iOS
<!-- TODO: (Q4 2023) Safari 17 / macOS 14 Sonoma supports installable PWAs too -->
## Installation
### Chrome/Safari on Desktop
To install and register the web app via Chrome, click the "install app" icon. After installation, you can find the app in your
app drawer:
<div id="pwa-screenshots-chrome-safari-desktop" class="screenshots">
<a href="../../static/img/pwa-install.png"><img src="../../static/img/pwa-install.png"/></a>
<a href="../../static/img/pwa.png"><img src="../../static/img/pwa.png"/></a>
<a href="../../static/img/pwa-badge.png"><img src="../../static/img/pwa-badge.png"/></a>
</div>
2023-06-25 14:40:40 +12:00
### Chrome/Firefox on Android
For Chrome on Android, either click the "Add to Home Screen" banner at the bottom of the screen, or select "Install app"
in the menu, and then click "Install" in the popup menu. After installation, you can find the app in your app drawer,
and on your home screen.
2023-06-25 14:08:57 +12:00
<div id="pwa-screenshots-chrome-android" class="screenshots">
<a href="../../static/img/pwa-install-chrome-android.jpg"><img src="../../static/img/pwa-install-chrome-android.jpg"/></a>
<a href="../../static/img/pwa-install-chrome-android-menu.jpg"><img src="../../static/img/pwa-install-chrome-android-menu.jpg"/></a>
<a href="../../static/img/pwa-install-chrome-android-popup.jpg"><img src="../../static/img/pwa-install-chrome-android-popup.jpg"/></a>
</div>
2023-06-25 14:40:40 +12:00
For Firefox, select "Install" in the menu, and then click "Add" to add an icon to your home screen:
2023-06-25 14:08:57 +12:00
2023-06-25 14:40:40 +12:00
<div id="pwa-screenshots-firefox-android" class="screenshots">
<a href="../../static/img/pwa-install-firefox-android-menu.jpg"><img src="../../static/img/pwa-install-firefox-android-menu.jpg"/></a>
<a href="../../static/img/pwa-install-firefox-android-popup.jpg"><img src="../../static/img/pwa-install-firefox-android-popup.jpg"/></a>
</div>
2023-06-25 14:08:57 +12:00
### Safari on iOS
2023-06-26 01:43:51 +12:00
On iOS Safari, tap on the Share menu, then tap "Add to Home Screen":
2023-06-25 14:08:57 +12:00
2023-06-26 01:43:51 +12:00
<div id="pwa-screenshots-safari-ios" class="screenshots">
<a href="../../static/img/pwa-install-safari-ios-button.jpg"><img src="../../static/img/pwa-install-safari-ios-button.jpg"/></a>
<a href="../../static/img/pwa-install-safari-ios-menu.jpg"><img src="../../static/img/pwa-install-safari-ios-menu.jpg"/></a>
<a href="../../static/img/pwa-install-safari-ios-add-icon.jpg"><img src="../../static/img/pwa-install-safari-ios-add-icon.jpg"/></a>
</div>
2023-06-25 14:08:57 +12:00
## Background notifications
Background notifications via web push are enabled by default and cannot be turned off when the app is installed, as notifications would
not be delivered reliably otherwise. You can mute topics you don't want to receive notifications for.
On desktop, you generally need either your browser or the web app open to receive notifications, though the ntfy tab doesn't need to be
open. On mobile, you don't need to have the web app open to receive notifications. Look at the [web docs](./web.md#background-notifications)
for a detailed breakdown.