binwiederhier / ntfy

Send push notifications to your phone or desktop using PUT/POST
https://ntfy.sh
Apache License 2.0
18.55k stars 730 forks source link

Android: Show message from app/connector if not null or blank #1166

Open nikclayton opened 3 months ago

nikclayton commented 3 months ago

:bulb: Idea

https://unifiedpush.org/developers/spec/android/#orgunifiedpushandroiddistributorregister describes a message that can be included when registering with the distributor.

  • message (String): a short description of the purpose of the registration that the distributor MAY show to the user.

ntfy-android doesn't do anything with this.

If present, and not-null/blank, it could be displayed in list of registered instances. At the moment that list has entries that look like this:

ntfy.sh/<some endpoint> app.pachli (UnifiedPush)

If the app has registered multiple times (e.g., because there are multiple accounts in the app) there is no indication to the user which account is associated with which registration.

I think this could be more useful to the user if the information shown was:

${appName}: ${appMessage} ntfy.sh/<some endpoint>

where

Possible enhancement to the above: use PackageManager.getApplicationIcon() to show the application's icon in the list as well.

:computer: Target components

Android app