Skip to content

Commit b686cb6

Browse files
committed
update readme
add `POST_NOTIFICATIONS` permission for android 13+
1 parent cdf65c7 commit b686cb6

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

README.md

+20-3
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,28 @@ Notifikator
33

44
This is an Android application that catches every notification and forwards them to an HTTP endpoint.
55

6-
It natively supports talking to the [Kodi](https://kodi.tv/) JSON-RPC interface, [Notifications for Android TV](https://play.google.com/store/apps/details?id=de.cyberdream.androidtv.notifications.google), as well as sending plain JSON.
6+
It natively supports talking to the [Kodi](https://kodi.tv/) JSON-RPC interface, [Notifications for Android TV](https://play.google.com/store/apps/details?id=de.cyberdream.androidtv.notifications.google), [Gotify](https://gotify.net/), as well as sending plain JSON.
77

88
How to Use
99
----------
1010

1111
1. Install the application.
1212
2. Enable notification access (a shortcut is provided within).
1313
3. Configure the HTTP endpoint, protocol and authentication if necessary (see next section).
14-
4. *(Optional)* Send a test notification.
14+
4. *(Optional)* Configure the package denylist to silence noisy packages
15+
5. *(Optional)* Send a test notification.
16+
17+
Package Denylist
18+
---------
19+
In order to deny specific applications from having their notifications forwarded, first get a list of your packages. This is simply obtained from running `adb shell pm list packages`. Applications' package names are also shown under the application's settings in the system settings application.
20+
21+
Format your package names in a text file with one package name per line. Remove the `package:` prefix if copy-pasting from the output of `pm list packages`. If generating this on a computer, `adb push` can be used to send this text file to your android device.
22+
23+
Click `Package Denylist File` in the app and select your denylist file.
24+
25+
Changes to the content of this file won't be automatically detected by the app - you must reload the file for any changes to take effect.
26+
27+
The packages specified in the denylist need not be installed on the device - they simply won't do anything if the given package never sends a notification.
1528

1629
Protocols
1730
---------
@@ -40,6 +53,10 @@ This protocol forwards the notification to the server part of the [Notifications
4053

4154
The endpoint URL should look like `http://hostname:7676/`, and authentication should not be enabled.
4255

56+
### Gotify
57+
58+
This protocol simply POSTs a formatted JSON to the supplied URL. It expects a Gotify server's URL in this format: `https://gotify.example.com/message?token=$APP_TOKEN`. As of now, the `title` parameter is hard-coded to `Notifikator`, and `priority` to `5`.
59+
4360
### JSON
4461

4562
This protocol will simply `POST` a JSON containing the notification title, text, small and large icons to an arbitrary endpoint. This is designed for people who want to write their own server code to handle it.
@@ -57,4 +74,4 @@ Here is an example JSON, note that any of the fields not present in the original
5774
"icon": "data:image/png;base64,..."
5875
}
5976
}
60-
```
77+
```

client/src/main/AndroidManifest.xml

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<uses-permission android:name="android.permission.INTERNET" />
33
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
44

5+
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
6+
57
<application
68
android:allowBackup="true"
79
android:label="@string/app_name"

0 commit comments

Comments
 (0)