Sending the value to firebase in background tasks

Sending the value to firebase in background tasks
Can it be done correctly?

describe your problem in detail