RE: App question

"Don Woodward" <[email protected]>
Newsgroups gmane.comp.hardware.roku.technical
Message-ID <000b01c432c9$d956b490$c800a8c0@silverbox>
Elan,
 
You wrote:
> I've gotten my Roku app so that it vanishes when the user hits the "Menu" key (but keeps running in the background).
> What's the best way to restore it when the user Select the application icon again?
 
I'll have to go digging around for code, but here's a way using ECP:
 
Change your OnAppInit() to:
 
First send an ECP command of your own design
(with CascadeInput::DispatchECPCommand()) and examine the reply.
If the ecp command is handled, you know your app was running and
materialized itself again, you can then call Terminate(0) in that instance
and return from OnAppInit().
 
If the ECP command was not handled, then your app didn't do its thing,
and you may proceed with normal initialization.  You'll simply add
a call to RegisterECPCommand() in OnAppInit at that point to register
your new ECP Command.
 
Then add yourself an OnECPCommand() virtual member function that
will examine the request, determine what
state it is in, materialize itself if required, then set the reply string
so that the calling app knows what happened.
 
-Don

_______________________________________________
Roku-tech mailing list
[email protected]
http://lists.rokulabs.com/mailman/listinfo/roku-tech
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.