Can we add firebase database components in background task extension?

I need to ask community , that will I able to add firebase when data change block in the background task of the application ?
If yes then How I can do it with this extension?

Thanks in advance !

What about this example ?

Hi I had try this , according to that post

But I face one problem , the notification I will get after app closed is up to few minutes but when I check it after few hours then notification didn’t show in my device .

Is there any working time of extension?