Activity Recognition may throw quite a few false positives as you, no matter how high you raise the confidence level. So if, for example, I would like to throw a notification when the user is driving I would need build some sort of state machine.
For example:
When I get IN_VEHICLE
updates with CONFIDENCE > 70
for 30 seconds, I send a notification
or
When I get 3 consecutive IN_VEHICLE
updates with CONFIDENCE > 70
, I send a notification
There are different issues when implementing it though. Sometimes you get very frequent updates (2nd fails) or you vet very rare updates (1st fails).
How do go about designing this so that you have smoother transitions between states?