Skip to content

Bug/Feature Request: Update FirebaseMessagingService to extend from LifecycleService #3851

Open
@ColtonIdle

Description

@ColtonIdle

[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
    with the firebase tag.
  • For general Firebase discussion, use the 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.

[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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions