basically having something that sorta said, "throw this on your screens like salt" and BOOM, you have analytics of user behavior.
Like, I want one call 'analyze.this()' and badda-bing-badda-boom, you know how they're navigating. You know that they saw a poster screen and saw the movie "Breakin' 2: electric boogaloo" and ejected out of the app.
But...having a begin/end isn't bad.
But you do have to know, "ok, we're back viewing navigating this screen" and re-call analytics to say, "hey, they're back here again!"
So....
Sub ShowPosterScreen()
port = CreateObject("roMessagePort")
poster = CreateObject("roPosterScreen")
poster.SetMessagePort(port)
' Set up screen
poster.show()
While True
call_analytics("Showing poster screen!")
message = Wait(0, port)
If message.isScreenClosed()
Exit While
else if message.isListItemSelected()
ShowSpringboardScreen( < get content details using > message.getIndex())
end if
End While
End Sub
Sub ShowSpringboardScreen()
port = CreateObject("roMessagePort")
springBoard = CreateObject("roSpringboardScreen")
springBoard.SetMessagePort(port)
' Set up screen...
springBoard.Show()
While True
call_analytics("Showing springboard screen")
message = wait(0, port)
If message.isScreenClosed() Then
Exit While
Else If message.isButtonPressed() Then
' Process menu items...
End If
End While
' Returning destroys the 'springBoard' variable, which closes the
' springboard screen, and reveals the poster screen again.
End Sub
It actually... not that bad. Man, I tried to make something simple and it ended-up complicated.