"destruk" wrote:
What you would "I think" have to do is to have your app poll your server at set intervals - and the server could log if the app polled on time or not. If the server didn't receive a request within a set timeframe from the roku client then the app would no longer be running.
I would do something simular to this. When the video starts, I would get the starting position, and send the contentid & position to the server, log the starting position, and have it give me a tracking ID. There is an event that triggers every few seconds while a video is playing to give you the position of the video. I would simply catch that event, and use an async http request to send the tracking ID & the latest position to the server. Then the server would log that position as the ending position. Each time the server gets a new position, it simply overwrites the last ending position. That gives you a rough idea of how much of the video was played, and where it started (useful for when people resume a video).
Or, a variation on that, just use timestamps. When the video starts, just log the content ID, and the starting time, and get back a tracking ID. Then with each position update, just log the new time for an ending time. Although you lose the position info, you get time played info. That will give you clues about how much people fast forwarded through the video.
--YB
YungBlood
Bringing more fun to Roku!