Dhir_Pratap
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2016
02:42 AM
Resume
Hi,
I have seen Netflix channel which preserves the screen the user had visited. Ex if the user is watching a movie detail screen and he presses the home button, when he returns back to the app, the movie detail page is launched. Is there any way we can do the same? I am thinking to create a stack for the navigation but not sure where can I store it when the app exits.
I have seen Netflix channel which preserves the screen the user had visited. Ex if the user is watching a movie detail screen and he presses the home button, when he returns back to the app, the movie detail page is launched. Is there any way we can do the same? I am thinking to create a stack for the navigation but not sure where can I store it when the app exits.
5 REPLIES 5
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2016
09:44 AM
Re: Resume
Don't get out of your way trying to emulate Netflix or YouTube - you are not on equal footing, they don't get killed on Home press.
You can leave yourself a breadcrumbs trail using roRegistrySection.
You can leave yourself a breadcrumbs trail using roRegistrySection.
Dhir_Pratap
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2016
01:20 AM
Re: Resume
EnTerr,
Just out of curiosity is there any way we can prevent our app from being killed on pressing home?
Just out of curiosity is there any way we can prevent our app from being killed on pressing home?
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2016
10:26 AM
Re: Resume
"Dhir Pratap" wrote:
is there any way we can prevent our app from being killed on pressing home?
Nope. And there shouldn't be.
However: it makes sense for Roku to notify the app it's in the process of being closed (foreclosed? :)), so it has a few deciseconds to save the family jewels.
That does not exist yet - but would be easy for the Co. to implement. Say by something like roDeviceInfoEvent^ that the app can listen for and if received, panic as appropriate.
(^) except maybe a "roAppInfoEvent"? Doesn't matter much as long as it exists. Could be even ECP /input, though that'd be probably slightly unclean (unexpected input, potential collisions... )
Komag
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2016
03:37 PM
Re: Resume
Indeed, I only need a few milliseconds to save the game!
Dhir_Pratap
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2016
12:48 PM
Re: Resume
I don't really have to save the state on close. I can add the scene to my backstack object when the scene opens. I am looking for a way to retrieve this object when the app is started. I don't think registry will not be enough for me to store the data. But I can give it a try. Is there a way I can serialize/deserialze node object so that it can be stored in registry?