menghao
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2016
01:08 AM
Scene Graph App quit event
Is there any way I can just block the quit event for a second? Or any walkaround? I need to detect the quit event at least. I want to log the usage to a remote server, let's say google analytics. For now, as I know, the OnKeyEvent() in the node can not detect the home button pressed. And it seems in the main.brs, the while loop that listens on the messagePort is not working either. It seems that no roSGScreenEvent has happened, the logQuit() was never called.
while(true)
msg = wait(0, m.port)
msgType = type(msg)
if msgType = "roSGScreenEvent"
if msg.isScreenClosed() then
logQuit()
return
end if
end if
end while
5 REPLIES 5
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-11-2016
12:15 PM
Re: Scene Graph App quit event
No, there isn't.
This is not a scenography issue in particular - it's Roku one in general.
There is a suggestion on how to fix that already, see here https://forums.roku.com/viewtopic.php?f ... 30#p487482
Waiting for Roku* to chime in, I suppose. Sheesh, can't believe it's been over a year?!
This is not a scenography issue in particular - it's Roku one in general.
There is a suggestion on how to fix that already, see here https://forums.roku.com/viewtopic.php?f ... 30#p487482
Waiting for Roku* to chime in, I suppose. Sheesh, can't believe it's been over a year?!
menghao
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2016
01:31 AM
Re: Scene Graph App quit event
"EnTerr" wrote:
No, there isn't.
This is not a scenography issue in particular - it's Roku one in general.
There is a suggestion on how to fix that already, see here https://forums.roku.com/viewtopic.php?f ... 30#p487482
Waiting for Roku* to chime in, I suppose. Sheesh, can't believe it's been over a year?!
Thank you EnTerr, the way I can image is that at least I can record the time of the app quit. And try to send usage event when the app restarts next time.
I worked on android TV the leanback library before, they all support the background activities. Hope Roku will think about it. This is a common usage case indeed.
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2016
11:14 AM
Re: Scene Graph App quit event
"menghao" wrote:Umm... "background activities" is one of the big mor-asses of Android, at least for mobile. I wouldn't go there!
Thank you EnTerr, the way I can image is that at least I can record the time of the app quit. And try to send usage event when the app restarts next time.
I worked on android TV the leanback library before, they all support the background activities.
Hope Roku will think about it. This is a common usage case indeed.
Most all mobile and media platforms support exit events, indeed. In fact i can't think of one that doesn't.
It's entirely possible Roku already implemented that a year ago, just forgot to tell us, the "little people". It has happened before (cue formatJSON(), some ECP commands, getPng()... ).
the_mace
Channel Surfer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2017
03:44 PM
Re: Scene Graph App quit event
This page is confusing:
https://sdkdocs.roku.com/display/sdkdoc/roSGScreenEvent
It makes it look like you can intercept the close event, but when the home button is pressed the app doesn't get any events
https://sdkdocs.roku.com/display/sdkdoc/roSGScreenEvent
It makes it look like you can intercept the close event, but when the home button is pressed the app doesn't get any events
jaxim
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2017
06:48 AM
Re: Scene Graph App quit event
Have any new developments been made or discovered on this subject?