My scenario. A page of my WP8 Silverlight app contains a ListBox control with the ability of item multiselection. When the user tap an item to toggle its selection state, I should perform a long operation for all items which are selected by that moment (for example, run a query to filter by the currently selected items). The user can tap some items very quickly, and there is no need to run the query every time after each tap (especially taking into account the fact that the query can take 1-2 seconds). I need to run the query if the user does nothing say for 1 or 2 seconds.
What is the best, not resource consuming, way to implement in WP8? Perhaps, the platform provides us with a useful service for that?
I would expect an application that behaves in such a way to be loathed by the users of it. But if you must then you simply need to reset a timer every time something that you consider as "activity" within your app happens. Presumably this'll be some form of user interaction such as page navigation or interacting/tapping/editing content.
It's crude but it'll work. It'll also negatively impact the battery too. You have been warned.
For Other Alternative see Resetting Idle Detection Countdown in Windows Phone