How can I send data to Firebase from Kotlin part of android project and not from dart code

Hi guys,

For the past few days I have been trying to run background services in my flutter project. I have finally accomplished this and I can now track the users location even when the app is killed. I now need to send this location information to Firebase.

The problem is that the background service runs in Kotlin code since dart does not have a way for running background services. I have configured firebase for my dart project but I am unable to use firebase in my Kotlin code. Is there a way to do this?


@patrick_dm Would you know how to do this?

Hello, like I told you I don’t know kotlin and have null experience with it, so I’m not the one who can give you an answer. But others maybe could; where is your issue? Is it about service’s configuration in the background process? Or is it the kotlin way to consume firebase apis? In both cases I also think you should look for help in some kotlin related forum. I can’t believe you are the first with this requirement, so maybe Stack Overflow is a good place to search for related questions; the answer could be laying in there waiting for you. Good luck with your quest!

Hey @patrick_dm Thanks for your reply! I have tried searching stack overflow, YouTube and flutter forums but haven’t been able to find anything and hence the question. I’ll write a question on stack overflow and see if I get a reply.

I’d try also in


1 Like