Commit graph

1453 commits

Author SHA1 Message Date
Mikael Hugo
5c746bd4b9 Enable screen blink (LED) for PRIORITY_HIGH notifications
Some checks failed
Build F-Droid Debug APK / build (push) Failing after 16s
Build Play Debug APK / build (push) Failing after 8s
PRIORITY_HIGH now shows the notification LED / screen blink alongside
the vibration and DND bypass, making it more visible when the phone
is face-down or in a pocket.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-15 06:48:35 +02:00
Mikael Hugo
e3231970a3 Allow PRIORITY_HIGH notifications to bypass DND with normal beep
Some checks are pending
Build F-Droid Debug APK / build (push) Waiting to run
Build Play Debug APK / build (push) Waiting to run
PRIORITY_MAX still plays the insistent looping alarm until manually stopped.
PRIORITY_HIGH now also bypasses DND but uses the standard notification
sound + vibration pattern (no looping alarm).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-15 06:48:01 +02:00
Mikael Hugo
684ac9597d ci(android): add Firebase App Distribution to release workflows
Adds Firebase CLI install + appdistribution:distribute step to both
F-Droid and Play release workflows. Also adds a new build-play-release.yml
workflow for the Play (Firebase) flavor.

Required secrets (store in Forgejo repo → Settings → Secrets):
  FIREBASE_APP_ID     — from Firebase project settings
  FIREBASE_CI_TOKEN   — from Firebase CLI login:ci
  ANDROID_KEYSTORE_BASE64 — base64-encoded release keystore
  ANDROID_KEYSTORE_PASSWORD
  ANDROID_KEY_ALIAS
  ANDROID_KEY_PASSWORD

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-15 03:37:18 +02:00
Mikael Hugo
2592f61942 feat(android): native push via ops /api/push/:topic
Adds OpsPushWorker, a WorkManager-based native push client that
connects to the centralcloud-ops push endpoints (SSE stream +
messages catch-up) instead of relying solely on FCM/ntfy.

## New module

- OpsPushWorker — polls /api/push/:topic/messages for catch-up,
  then opens an SSE stream on /api/push/:topic/stream. Messages
  are normalized into the existing ntfy Message shape so all
  existing notification plumbing (channels, DND bypass, actions)
  works unchanged.

## Changes to existing modules

- Application.kt: calls SmsRelayInit.start() on cold boot
- RemoteConfigFetcher: parses native_push block from
  /api/android/config response and schedules/cancels the worker
- SmsRelayInit: restarts the worker on cold boot if enabled
- SmsRelayPreferences: adds native_push_* persisted config keys

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-15 02:33:27 +02:00
Mikael Hugo
be4ffb4ede Commit current workspace state 2026-05-13 01:58:24 +02:00
Mikael Hugo
d5694a3206 rename: drop all ntfy heritage — package, log tags, brand, URLs (Tier 2)
Full namespace + token rename across the entire fork. Greenfield, no
backwards-compatibility aliasing.

Package rename
  io.heckel.ntfy.*  →  com.centralcloud.oncall.*
  - 71 .kt + 3 .java + 2 .xml + 1 .gradle file contents rewritten
  - source tree moved under app/src/{main,play,fdroid}/java/com/centralcloud/oncall/
  - namespace updated in app/build.gradle
  - Room schema dir app/schemas/io.heckel.ntfy.* removed (regenerates)

Token sweep
  Ntfy/NTFY/ntfy  →  Oncall/ONCALL/oncall  in all code/resource files,
                     including Japanese translations.
  Affected: log-tag constants (NtfyApplication, NtfyMainActivity, ...),
            BroadcastService SEND_MESSAGE / CONNECTION_ALERT_* action names,
            translated string resources mentioning ntfy.

URL hostnames
  ntfy.sh         →  oncall.hugo.dk
  docs.ntfy.sh    →  docs.oncall.hugo.dk
  ntfy.hugo.dk    →  oncall.hugo.dk
  ntfy.example.com, ntfy.ejemplo.es, ntfy.exemple.cat, ntfy.exemplo.com.br,
  ntfy.exemplo.pt → oncall.* equivalents (i18n example URLs)

Deep-link scheme
  ntfy://  →  oncall://

Backup format
  FILE_MAGIC "ntfy2586" → "oncall26" (greenfield, no existing backups to read)

Verified: zero matches for /ntfy/i across the entire source tree, gradle
files, resources, and AGENTS.md.

DNS reminder: app_base_url default is now https://oncall.hugo.dk — point
that DNS record at the same server as ntfy.hugo.dk (or update the
default in BuildConfig if you prefer a different hostname).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 18:56:34 +02:00
Mikael Hugo
b59b0f16de sms: standalone settings screen for the relay (Phase 2.1)
Adds a SmsRelaySettingsActivity that edits the four config knobs
(enabled, base URL, device ID, sender whitelist) directly against the
`sms_relay_prefs` SharedPreferences file via a PreferenceFragmentCompat.
Also shows last-forward time and 24h failure count read-only.

Standalone (its own Activity), not folded into the existing
SettingsActivity, so this lands without touching the 1000-line monolith.
Launch with adb during bring-up:

    adb shell am start -n io.heckel.ntfy/.sms.SmsRelaySettingsActivity

A future pass can link it from main_preferences.xml with
    app:fragment="io.heckel.ntfy.sms.SmsRelaySettingsActivity$Fragment"

  SmsRelayPreferences.whitelist
    Storage format moved from StringSet to a single comma-separated
    string so an EditTextPreference can edit it directly. External API
    is unchanged — getter still returns Set<String>, whitespace and
    empty entries stripped on read.

  res/xml/sms_relay_preferences.xml
    SwitchPreferenceCompat (enabled) + three EditTextPreferences
    (base_url, device_id, whitelist) + two read-only summary entries
    (last forward, failure count).

  SmsRelaySettingsActivity / Fragment
    Activity hosts the fragment; fragment loads the XML, points the
    PreferenceManager at the `sms_relay_prefs` file, and refreshes the
    read-only status entries on resume.

Manifest <activity> declaration goes with the broader pending manifest
commit alongside the SmsRelayReceiver registration.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 18:44:57 +02:00
Mikael Hugo
52809f6ed4 sms: device heartbeat + last-forward tracking (Phase 2 Slice B)
So centralcloud-ops can SEE that this phone is alive and the SMS relay
is working. Server side (POST /api/devices/heartbeat + /devices LiveView)
landed in centralcloud_ops commit 6a7f22e.

  DeviceHeartbeatWorker
    Periodic CoroutineWorker (15min, the WorkManager floor) that POSTs
    sms_relay state + device_state to /api/devices/heartbeat.

    sms_relay summary: enabled, whitelist_size, last_forward_at,
                       failure_count_24h.
    device_state:      battery_level, is_charging, network_type,
                       low_power_mode, dnd_active, ringer_mode.
    DND read via NotificationManager.currentInterruptionFilter — works
    on API 23+ without notification policy access permission.

    Skips (Result.success) when relay isn't configured yet — no point
    spamming the server, but the schedule stays alive so it picks up
    automatically as soon as config lands.

  SmsRelayInit
    One-liner bootstrap. Call from Application.onCreate when your
    managed-config / branding WIP merges:
        SmsRelayInit.start(this)
    Idempotent (WorkManager KEEP policy) so safe across cold starts.

  SmsRelayPreferences (extended)
    Tracks lastForwardAtMs (epoch-ms, set by SmsForwardWorker on 200)
    and failureCount24h (rolling, reset by heartbeat on success).

  SmsForwardWorker (extended)
    On 200 → record lastForwardAtMs. On 4xx/5xx/exception → bump
    failureCount24h. Heartbeat then reports both up to the server,
    which renders them on the /devices LiveView.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 18:41:57 +02:00
Mikael Hugo
6d389ea6af sms: relay inbound SMS to centralcloud-ops (Phase 2)
Whitelisted incoming SMS are forwarded to the centralcloud-ops
phone-relay endpoint as a redundant inbound path alongside Twilio.

  io.heckel.ntfy.sms.SmsRelayPreferences
    SharedPreferences-backed config — enabled flag, base URL, device id,
    sender whitelist (Set<String>). Strict opt-in: forward nothing unless
    explicitly enabled AND a non-empty whitelist matches the sender.

  io.heckel.ntfy.sms.SmsRelayReceiver
    BroadcastReceiver bound to SMS_RECEIVED_ACTION. Extracts the sender +
    concatenated body of multi-part SMS, applies the whitelist, and
    enqueues a OneTimeWorkRequest for forwarding. Wraps everything in
    try/catch so a failure on this hot path can never crash the device's
    SMS handling.

  io.heckel.ntfy.sms.SmsForwardWorker
    CoroutineWorker that POSTs to {baseUrl}/api/sms/inbound/phone-relay
    with X-Device-Id auth. Uses HttpUtil.defaultClient and JSONObject
    (no new deps). 4xx -> permanent drop, 5xx/network -> WorkManager
    exponential backoff retry. WorkManager constraints require a
    connected network so retries don't fire while offline.

  Manifest registration (uses-permission RECEIVE_SMS / READ_SMS, receiver
  declaration) is left as WIP in the working tree pending the broader
  managed-config / branding changes also in progress on the manifest.
  Commit those together (or in a follow-up) to make the receiver actually
  bind.

  No settings UI yet — set values via SharedPreferences directly or wait
  for the Phase 2.1 settings screen.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 18:34:31 +02:00
Philipp Heckel
a9c5cda4bd Bump, review; update 5->3min 2026-04-10 21:45:01 -04:00
Philipp Heckel
9d8a04f527
Translated using Weblate (German)
Currently translated at 100.0% (482 of 482 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/de/
2026-04-11 03:16:17 +02:00
Philipp Heckel
993e7e9390 Merge branch 'main' of https://hosted.weblate.org/git/ntfy/android 2026-04-09 20:41:17 -04:00
Philipp Heckel
e90b87b037 Fix var capture 2026-04-09 20:40:53 -04:00
Kajus S
a978941e11
Added translation using Weblate (Lithuanian) 2026-04-09 21:26:09 +02:00
Cairo Braga
5501558a15
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (482 of 482 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/pt_BR/
2026-04-09 14:10:01 +00:00
Cairo Braga
6a41c71a12
Translated using Weblate (Portuguese)
Currently translated at 100.0% (482 of 482 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/pt/
2026-04-09 14:10:00 +00:00
Cairo Braga
883afabe35
Translated using Weblate (Catalan)
Currently translated at 70.7% (341 of 482 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/ca/
2026-04-09 14:09:59 +00:00
Cairo Braga
fce33b348d
Translated using Weblate (Galician)
Currently translated at 83.1% (401 of 482 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/gl/
2026-04-09 14:09:57 +00:00
Cairo Braga
bb21b293b6
Translated using Weblate (Spanish)
Currently translated at 100.0% (482 of 482 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/es/
2026-04-09 14:09:52 +00:00
Priit Jõerüüt
61e6e7f87a
Translated using Weblate (Estonian)
Currently translated at 100.0% (482 of 482 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/et/
2026-04-09 14:09:50 +00:00
大王叫我来巡山
05aad012e3
Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (482 of 482 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/zh_Hans/
2026-04-08 15:21:25 +02:00
Patrick van Halderen
ea584728f0
Translated using Weblate (Dutch)
Currently translated at 89.8% (433 of 482 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/nl/
2026-04-08 15:21:25 +02:00
Cairo Braga
f07a83f14f
Translated using Weblate (Portuguese)
Currently translated at 100.0% (482 of 482 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/pt/
2026-04-08 15:21:25 +02:00
Cairo Braga
39b0c70ea6
Translated using Weblate (Spanish)
Currently translated at 100.0% (482 of 482 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/es/
2026-04-08 15:21:25 +02:00
Cairo Braga
d85b530694
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (482 of 482 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/pt_BR/
2026-04-08 15:21:25 +02:00
ezn24
003f84d684
Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 100.0% (482 of 482 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/zh_Hant/
2026-04-08 15:21:25 +02:00
Cairo Braga
fa7e640d77
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (481 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/pt_BR/
2026-04-07 22:59:47 +02:00
ezn24
7b440adde1
Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 96.8% (466 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/zh_Hant/
2026-04-07 22:59:47 +02:00
Cairo Braga
bee3e1afac
Translated using Weblate (Galician)
Currently translated at 83.3% (401 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/gl/
2026-04-07 22:59:46 +02:00
Cairo Braga
c07c6b7093
Translated using Weblate (Portuguese)
Currently translated at 100.0% (481 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/pt/
2026-04-07 22:59:45 +02:00
Cairo Braga
6522ca957e
Translated using Weblate (Spanish)
Currently translated at 100.0% (481 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/es/
2026-04-07 22:59:44 +02:00
Philipp Heckel
139f586be6 Restart service when network returns, even when app was killed 2026-04-07 16:46:48 -04:00
Philipp Heckel
f1ae432156 Merge branch 'main' into disable-up 2026-04-07 15:42:46 -04:00
Philipp Heckel
992f9a5392 Bump 2026-04-07 14:55:24 -04:00
Philipp Heckel
3e93a3fb8d Untested: WS battery improvement, relates to #113 and binwiederhier/ntfy#1662 2026-04-07 10:30:28 -04:00
Philipp Heckel
41912441cd Merge branch 'main' of github.com:binwiederhier/ntfy-android into disable-up 2026-04-07 09:23:46 -04:00
Daniel Maganha
7bb812662e
Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (481 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/pt_BR/
2026-04-06 20:09:51 +02:00
Priit Jõerüüt
201e6b3ccd
Translated using Weblate (Estonian)
Currently translated at 100.0% (481 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/et/
2026-04-06 20:09:49 +02:00
Allan Nordhøy
2999f60c78
Translated using Weblate (Norwegian Bokmål)
Currently translated at 67.7% (326 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/nb_NO/
2026-04-05 03:10:09 +02:00
Rubens
e3de87245b
Translated using Weblate (Catalan)
Currently translated at 67.7% (326 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/ca/
2026-04-05 03:10:08 +02:00
Leith Hobson
66a13060c2
Translated using Weblate (Afrikaans)
Currently translated at 6.6% (32 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/af/
2026-04-05 03:10:07 +02:00
interserver support
7b67b0e043
Translated using Weblate (Tamil)
Currently translated at 67.7% (326 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/ta/
2026-04-05 03:10:04 +02:00
Luka Havrlišan
84b4aae7aa
Translated using Weblate (Croatian)
Currently translated at 16.6% (80 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/hr/
2026-04-05 03:10:02 +02:00
nuo18
e33a659025
Translated using Weblate (Hindi)
Currently translated at 18.0% (87 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/hi/
2026-04-05 03:10:01 +02:00
大王叫我来巡山
f24de94152
Translated using Weblate (Chinese (Simplified Han script))
Currently translated at 100.0% (481 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/zh_Hans/
2026-04-05 03:10:00 +02:00
Хусниддин
d04b75ac36
Translated using Weblate (Uzbek)
Currently translated at 67.7% (326 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/uz/
2026-04-05 03:09:59 +02:00
Deleted User
c3b10d9be2
Translated using Weblate (Greek)
Currently translated at 16.0% (77 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/el/
2026-04-05 03:09:57 +02:00
Timur
fc50e5c7b2
Translated using Weblate (Russian)
Currently translated at 99.7% (480 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/ru/
2026-04-05 03:09:56 +02:00
Kachelkaiser
0efcc70be8
Translated using Weblate (German)
Currently translated at 100.0% (481 of 481 strings)

Translation: ntfy/Android app
Translate-URL: https://hosted.weblate.org/projects/ntfy/android/de/
2026-04-05 03:09:54 +02:00
Philipp Heckel
ff128772ed Migrate subscription icons from cache to files 2026-04-03 21:22:34 -04:00