Firebase listener when app is in the background

后端 未结 4 2083
逝去的感伤
逝去的感伤 2020-12-05 21:52

I have a Firebase childAdded event listener for the notifications table in my app that I would like to trigger push notifications when the app is in the backgro

4条回答
  •  天命终不由人
    2020-12-05 22:27

    Simple solution would be to use background fetch. You can also use background fetch to periodically fetch the table for new entries and show a notification if a new row is added.

    This does not assure that notifications are received immediately. But implementation is much simpler compared to using an APN.

提交回复
热议问题