Reputation: 327
I'm putting together an Android library that grabs sensor data and posts to an Azure Event Hub. Right now I am using Retrofit and posting the data one at a time from user input.
The next stage is to post the data at very frequent intervals. I get the sensor data at about 20 readings per second. I'm going to capture the data at about 2 per second, then I am going send the two captures to the event hub every second. These intervals will be parameterized to go faster or slower as needed.
In iOS, they have Grand Central Dispatch, which would create the type of throttled queue I'm looking for. I'm wondering what the optimal way to approach this would be in Android?
Upvotes: 0
Views: 473