New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PeriodicTrigger not working #384
Comments
It's because the background task executor is never stopped again, and hence cannot be started when already started:
So - I guess this comes down to semantics; what do we want to happen if we start a task that is already started? |
Maybe restart the task? For me the important thing is that we can do something periodically, such as getting a device/weather measurement. |
A way to solve it is to add a duration to the task so it stops automatically after a while:
But - there are a couple of issues with this too:
The issue is that measures both comes as one-time and event-based measures. And the So - will try to address this. |
carp_core 1.5.0 released solving item 1 above. Now you can write:
|
Anyway - another issue is that according to the definition of a
So - I guess that the implementation of the |
When I use a periodic trigger, for device info or weather, it only works once.
Code:
output:
As you can see it only once actually got the device info. Its the same for weather (where a periodic trigger is actually useful).
This was tested on iOS with
but I also had the problem with previous versions of carp_mobile_sensing (e.g. 1.4.7).
The problem is the same for Android (only the second entry is an actual entry)
I don't have the problem with PeriodicSamplingConfiguration.
The text was updated successfully, but these errors were encountered: