Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

No notification for received SMS inside a secondary Android user

Aperta
#918 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
android, kotlin
Ambito
mobile

Direzione di ricerca

Read the existing SmsReceiver and its SMS_DELIVER handling, then inspect the manifest entry and showReceivedMessageNotification. The report describes a tested secondary-user approach using SMS_RECEIVED and RoleManager.isRoleHeld; check how it resolves the shared SMS row without inserting a duplicate. Done means received messages in a secondary user trigger the expected notification, sound, and badge, while the system user remains unaffected.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug needs triage
Checklist
  • I can reproduce the bug with the latest version given here.
  • I made sure that there are no existing issues - open or closed - to which I could contribute my information.
  • I made sure that there are no existing discussions - open or closed - to which I could contribute my information.
  • I have read the FAQs inside the app (Menu -> About -> FAQs) and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.
Affected app version

1.9.1

Affected Android/Custom ROM version

GrapheneOS (Android 16), secondary user profile

Affected device model

Pixel 10 Pro

How did you install the app?

F-Droid / IzzyOnDroid

Steps to reproduce the bug
  1. On a phone with telephony, add a second user (Settings → System → Users → Add user) and allow it to use phone calls & SMS.
  2. Switch to that user, install Fossify Messages, set it as the default SMS app there, grant SMS / contacts / notification permissions.
  3. Stay in that user and lock the screen.
  4. Send an SMS to the phone from another number.
Expected behavior

The usual new-message notification, sound and launcher badge, exactly as in the Owner user.

Actual behavior

Nothing: no notification, no sound, no badge. Open Fossify Messages and the message is there, unread. Sending, reading and contacts all work. The Owner user is unaffected.

Screenshots/Screen recordings

No response

Additional information

Root cause, from reading AOSP: InboundSmsHandler.dispatchIntent sends SMS_DELIVER only to the default SMS app of the system (Owner) user. Secondary users never get it. The telephony provider (content://sms) is shared across users, so the Owner's default SMS app writes the row and the secondary user's Fossify sees it when opened, but SmsReceiver, which listens for SMS_DELIVER only, never fires there.

SMS_RECEIVED on the other hand is broadcast to every running user allowed to use SMS. Fossify does not listen for it.

I have a tested fix: a second receiver on SMS_RECEIVED that is inert in the system user and, in a secondary user, acts only when the app holds ROLE_SMS there. (Telephony.Sms.getDefaultSmsPackage() returns null inside a secondary user even when the role is held, so RoleManager.isRoleHeld is required.) It never inserts anything; it resolves the row the Owner's app wrote and calls the existing showReceivedMessageNotification. One new file plus a manifest entry; detekt and lint pass.

Branch: https://github.com/ualich/Messages/tree/secondary-user-notifications

Happy to open the PR if this gets help wanted.

Lingua principale
Kotlin
Stelle
1.6k
Fork
187
Merge medio
2g 9h
PR unite (30g)
20

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di FossifyOrg/Messages

Tutte le issue di FossifyOrg/Messages

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.