QtFirebase icon indicating copy to clipboard operation
QtFirebase copied to clipboard

Receiving messages from Firebase while app is killed

Open MasterMind2k opened this issue 5 years ago • 5 comments

During development I've identified that app, if killed, will not receive messages to C++ code if app is not running (with some moment to think about it, it makes sense actually :) ).

I have a use case that off the shelve notification bubble delivered by Firebase implementation won't do.

I am just opening this ticket to see if anyone has similar issues. I've cut some corners by completely ignoring Firebase C++ SDK and written a small layer in Java and custom integration API in the C++ parts.

Another thing that I realised is, that C++ written service cannot receive firebase messages. Since you need an Activity object when registering firebase app.

So, to sum this up. The use case is:

  • Be able to parse data messages even when application is dead

MasterMind2k avatar Jun 25 '19 15:06 MasterMind2k

Have you tried making a service? That way you have C++ code still alive when the app is shut down?

larpon avatar Oct 03 '19 09:10 larpon

Yes, I've made a use of services. But in this case, I do not need (or able) to use QtFirebase's wrapper around messaging.

Which in my use case, is not a problem. Maybe an idea, to prepare an infrastructure to have this ability by default in QtFirebase.

MasterMind2k avatar Oct 24 '19 16:10 MasterMind2k

Yes that would be useful - let me know if you come up with something!

larpon avatar Oct 25 '19 07:10 larpon

@MasterMind2k - just to make sure; are you using this

larpon avatar Mar 24 '20 15:03 larpon

Hmm, not sure. I do have somewhere in my memory that I've tried it.

Will retry anyway and post results.

MasterMind2k avatar Mar 31 '20 15:03 MasterMind2k