Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
slingxshot
Streaming Star

Restart Application

I have a logout button, and I want to restart application, possibly go back all the way to main.brs... anyway to reload the app or reload the scene?

Thanks!
0 Kudos
5 REPLIES 5
slingxshot
Streaming Star

Re: Restart Application

Doesn't seem to be a good way to restart application. The scenes just go on top, and trying closing the scene, exits the app or causes errors. There is probably a way so not worth. Instead I just exit the app and let the user go back in.

https://github.com/rymawby/roku-app-exit
0 Kudos
gabek
Visitor

Re: Restart Application

  appId = createObject("roAppInfo").getID()
  url = substitute("http://localhost:8060/launch/{0}?restart=true", appId)
  launchRequest = createObject("roUrlTransfer")
  launchRequest.setUrl(url)
  launchRequest.postFromString("")

It's probably not everybody's cup of tea, but in the most literal sense this will actually restart your application as opposed to other approaches where you try to clean up state and reload your SceneGraph components.
slingxshot
Streaming Star

Re: Restart Application

Oh man I wish i saw this earlier. This helps me a lot, solves 2 problems at once. I wanted to have authentication completed separate from the main app and this allows me after authentication restart the app and reset all settings with the registry, etc. Thank You!
0 Kudos
ramoneariel
Channel Surfer

Re: Restart Application on roku 12.0.0

This option works perfectly fine until Roku 11.50, but not from version 12.0.0. Return status 403,

ECP is not allowed from loopback address

 

EnTerr
Roku Guru

Re: Restart Application on roku 12.0.0

everyone facing such need, pls open ticket with partner success at roku.com, as to draw attention to the issue 

Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.