firebase / firebase/firebase-android-sdk
Bug/Feature Request: Update FirebaseMessagingService to extend from LifecycleService
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 710
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 31
Description
### [READ] Step 1: Are you in the right place?
Issues filed here should be about bugs in __the code in this repository__.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:
* For general technical questions, post a question on [StackOverflow](http://stackoverflow.com/)
with the firebase tag.
* For general Firebase discussion, use the [firebase-talk](https://groups.google.com/forum/#!forum/firebase-talk)
google group.
* For help troubleshooting your application that does not fall under one
of the above categories, reach out to the personalized
[Firebase support channel](https://firebase.google.com/support/).
### [REQUIRED] Step 2: Describe your environment
Firebase android sdk
### [REQUIRED] Step 3: Describe the problem
Currently the FirebaseMessagingService needs to make a call to a server to update when a token is refreshed. This is typically done in the modern way using kotlin + coroutines, but it's tough to launch a suspend function without a lifecycle aware scope. LifecycleService is the solution for this. Can we update FMS to extend from this instead?
See: https://stackoverflow.com/questions/68156680/how-to-start-a-background-thread-with-coroutine-on-a-service
Contributor guide
Assessment
This issue has not been assessed yet.