I'm working on specific app that detect items via MLKit (Android),detection works great, but what would be most optimal way to track for how long specific items was detected.
Like if I detect certain item I want to track how long it was detected for (in seconds). So if it was detected for X seconds, I want to invoke certain activity with that)