Open Source • Background Tasks: Itoo 🚀

Hi, I have been testing the comments you did yesterday, but with no luck.


I am just trying to make a sound whenever the callstate variable is equal to 1. But it is not being triggered.

I will describe what I expect to happen because perhaps I misunderstand the background service and perhaps I need the foreground one:
-Once the user closes the app (with the home button only), the database has to be continuously checked to search for a change in a certain variable (callstate).
-If callstate is equal to 1, it has to trigger a sound (simulating that you are receiving a call).
-If the callstate is equal to 0, it has to stop the sound (just in case it was being played before).

Later, once this works, I will try to use one more timer to make it sound continuously.

Thanks in advance!

PD: perhaps the error is in the web URL that I introduced? I want to access OnGoingCall variable:
image
And in the database it looks like:


It should be giving the result of ongoingcall, right?

1 Like