[FR] Expose `link` / `link_android` in notifications for deep linking
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- firebase, java
- Ambito
- api, backend-api-design
Direzione di ricerca
Inizia individuando le classi Notification e AndroidNotification e la mappatura del payload dell'HTTP API. Verifica come vengono serializzate le proprietà di notifica esistenti, quindi determina come link e link_android debbano essere mappati su gcm.n.link e gcm.n.link_android. Il lavoro è completo quando i campi ufficialmente supportati producono i payload di notifica deep-link richiesti.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem statement
Deep linking on Android requires the data field in the Intent to be set. As described in this SO post or firebase/firebase-android-sdk#6703, the only way to populate the the field in notifications created automatically by the Firebase Android SDK (when the app is in the background) is by setting the gcm.n.link or gcm.n.link_android keys in data, which have reserved prefixes and are therefore not supposed to be used (although setting them works, at least today).
Originally posted by @lehcar09 in #6703:
Alternatively, we can file a feature request to support the
linkorlink_androidfield. I’ll get back to you once I hear back from them.
So, this is the FR to officially support these :)
Strawman
A strawman proposal would be to add link properties to the Notification / AndroidNotification classes, which would then be mapped to gcm.n.link / gcm.n.link_android in the JSON payload. Equivalently, in the HTTP API instead of this:
{
"message": {
"notification": {
"title": "Lorem",
"body": "Ipsum"
},
"data": {
"gcm.n.link": "app://deep/link"
},
}
}
It would be this:
{
"message": {
"notification": {
"title": "Lorem",
"body": "Ipsum",
"link": "app://deep/link"
}
}
}
or this:
{
"message": {
"android": {
"notification": {
"title": "Lorem",
"body": "Ipsum",
"link": "app://deep/link"
}
}
}
}
Alternatives
The workaround suggested here of using setAction doesn't work, because actions needs to be declared in the Android manifest in order to match the intent, which conflicts with dynamically registering deep link targets.
Thanks!
- Lingua principale
- Java
- Stelle
- 620
- Fork
- 305
- Merge medio
- 4g 9h
- PR unite (30g)
- 4
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di firebase/firebase-admin-java
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
firebase/firebase-admin-java#1231 ·
-
api: core
firebase/firebase-admin-java#1198 · 3 commenti · 1 assegnatario ·
-
api: remoteconfig
firebase/firebase-admin-java#1196 · 1 commento · 2 assegnatari ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
firebase/firebase-admin-java#1192 · 3 commenti ·
-
needs-triage type: feature request
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
firebase/firebase-admin-java#1149 · 1 commento ·
Tutte le issue di firebase/firebase-admin-java
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
elastic/gradle-plugins#157 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
cryptomator/hub#497 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
johanhaleby/occurrent#1120 ·