#1 ?
Yes exactly,
A thread usually starts with the first post Open Source • Background Tasks: Itoo 🚀
Taifun
i want to have 2 background tasks running, one will be syncing data and the other must track location and send a notification if a change is detected.
How can i go about this, should i use 2 different itoo components or can i register 2 separate events??
You can see the previous post where we registered with 2 events and got succeeded..
- Clock timer
- Got text
oo ok thanks i will try
You will not be able to do this using itoo, see again my answer here
Taifun
ohhk thanks
can i just change itoo's foreground service type to location??
this would mean i need to use 2 itoos, but like kinda makes sense ig??
No. Using two background services functionality is not tested for. I'd suggest you to try to combine two functionalities into 1 itoo foreground service.
wht do u recommend for location??
Just read my previous answer
Taifun
ya but it is paid, and i cant pay i am like 13 and i have 0 dollars to my name
I was just reading through the first post again and noticed a documentation mismatch. Under the design solutions section it says:
- When the device restarts, how do I start a background process?
- This can be done using SaveProcessForBoot feature offered by the extension.
but then the documentation for SaveProcessForBoot
says the following.
Which one is it? I'm inclined to think the design solutions section is wrong, but I'm not positive.
Both is correct.
See again the first thread concerning foreground service running in the background:
Taifun
Oh, I didn't realize that's what that meant. Thanks for the information!
Hi Taifun.
First off, thank you so much for the work you have done on this project.
Secondly, I hope you might steer me in the right direction.
I seem to be starting the foreground service correctly, as the notification is showing in my top bar.
However, what i'm having trouble with specifically is the "web got text".
when i run the "get" block manually it works fine. But when I run it from the foreground service I can't seem to update anything on my firebase db.
Again thank you for your time
Remove that block
The clock already is running to call FarmDataUpdate regularly
It looks like you think, that your event Web1.GotText event will get triggered also in the background, this is not the case
In Update_Timer you have to register additionally the Web1.GotText event and do what you want to do in the corresppnding event handler
To debug use the Notifier.LogTextInfo method and use logcat to read the log
Taifun
thank you so much for that info my friend
here is my updated blocks. (let me know if you need to see anything else)
but ignore the broadcast event one.
does this look right to you?
i still am not seeing any updates in the firebase db
This looks ok
Now use the Notifier.LogInfo method for debugging together with logcat
For example to display the response content from the Web event handler
Taifun
ok. as far as i can tell i have adb running. and im succesffully getting stuff from my device.
however. I'm not seeing the response from the web.get.
here is the block snip, does that look right? i saw you previously mentioned "logText", but i didn't see that method in the list. Feeling confused, cause i thought the Notifier didn't work when the app wasn't open?
I am also filtering the logcat like this: adb logcat *:E | grep actualPackageName
Edit:
i changed the "LogError" to "LogInfo". and Changed my filter from *E to *I.
But same result. Cannot seem to see my responseContent in the log viewer.
i also added a "logerror" and a "loginfo" with the dummy text "this is a test", to see if the issue was the responseContent being blank. But i got the same result
And to clarify. My firebase DB is still not clearing or updating the value. But i have confirmed that the correct values are being stored into the itoo properties.
im sorry for my ignorance, and thank you so much for your replies. You are honestly getting me really really close to a working project