Alertify Android connects to gotify/server and shows push notifications on new messages.
Notification | Gotify Priority |
---|---|
- | 0 |
Icon in notification bar | 1 - 3 |
Icon in notification bar + Sound | 4 - 7 |
Icon in notification bar + Sound + Vibration | 8 - 10 |
Wireless Emergency Alert Dialog | 90 - 99 |
Wireless Emergency Alert Dialog + Sound + Overide volume and DND | 100 - 110 |
The title field is used to send the message type, Types are as follows:
Note, if title is absent or dosent match it defaults to "Critical Alert" Title is case insesitive
Type | Title Value | Message Type | Type | Title Value | Message Type |
---|---|---|---|---|---|
CMAS | President | Presidental alert | ETWS | Tsunami | ETWS Tsunami alert |
CMAS | Extreme | Extreme alert | ETWS | Earthquake | ETWS Earthquake alert |
CMAS | Severe | Severe alert | ETWS | ET | ETWS Earthquake & Tsunami alert |
CMAS | Amber | Amber / Child Abduction alert | ETWS | ETWS | ETWS Other Message |
CMAS | Public | Public Safety alert | ETWS | ETWSTest | ETWS Test Message |
CMAS | RMT | Required Monthly Test | |||
CMAS | StateTest | Local/State Test | |||
CMAS | Broadcast | Broadcast Operator alert | |||
CMAS | <OTHER> | Critical alert |
Title Value | Message Type |
---|---|
Tsunami | ETWS Tsunami alert |
Earthquake | ETWS Earthquake alert |
ET | ETWS Earthquake & Tsunami alert |
ETWS | ETWS Other Message |
ETWSTest | ETWS Test Message |
Example CMAS Presidental alert
curl "https://<gotifyURL>/message?token=<APPTOKEN>" -F "title=President" -F "message=This is the body" -F "priority=105"
Example CMAS Extreme alert muted
curl "https://<gotifyURL>/message?token=<APPTOKEN>"-F "title=Extreme" -F "message=This is the body" -F "priority=95"
Example ETWS Tsunami alert
curl "https://<gotifyURL>/message?token=<APPTOKEN>"" -F "title=Tsunami" -F "message=This is the body" -F "priority=105"
See Example Messages Images
- show push notifications on new messages
- view and delete messages
Download the apk or build via Android studio.
By default Android kills long running apps as they drain the battery. With enabled battery optimization, Gotify will be killed and you wont receive any notifications.
Here is one way to disable battery optimization for Gotify.
- Open "Settings"
- Search for "Battery Optimization"
- Find "Gotify" and disable battery optimization
Only possible for Android version >= 8
The foreground notification with content like Listening to https://push.yourdomain.eu
can be manually minimized to be less intrusive:
- Open Settings -> Apps -> Gotify
- Click Notifications
- Click on
Gotify foreground notification
- Select a different "Behavior" or "Importance" (depends on your android version)
- Restart Gotify
Notification | Gotify Priority |
---|---|
- | 0 |
Icon in notification bar | 1 - 3 |
Icon in notification bar + Sound | 4 - 7 |
Icon in notification bar + Sound + Vibration | 8 - 10 |
Wireless Emergency Alert Dialog | 90 - 99 |
Wireless Emergency Alert Dialog + Sound | 100 - 110 |
Execute the following command to build the apk.
$ ./gradlew build
- Run
./gradlew generateSwaggerCode
- Discard changes to
client/build.gradle
(newer versions of dependencies) - Fix compile error in
client/src/main/java/com/github/gotify/client/auth/OAuthOkHttpClient.java
(caused by an updated dependency) - Delete
client/settings.gradle
(client is a gradle sub project and must not have a settings.gradle) - Commit changes
This project is licensed under the MIT License - see the LICENSE file for details