Your Digital Media Has Never Looked So Good

 
slingxshot
Topic Author
Posts: 28
Joined: Tue Jul 14, 2015 8:58 am

Restart Application

Tue Nov 07, 2017 5:19 pm

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!
 
slingxshot
Topic Author
Posts: 28
Joined: Tue Jul 14, 2015 8:58 am

Re: Restart Application

Thu Nov 09, 2017 9:53 am

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
 
gabek
Posts: 45
Joined: Sat Jul 05, 2014 2:47 pm

Re: Restart Application

Thu Nov 09, 2017 2:47 pm

  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
Topic Author
Posts: 28
Joined: Tue Jul 14, 2015 8:58 am

Re: Restart Application

Sat Nov 11, 2017 9:41 am

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!

Who is online

Users browsing this forum: No registered users and 4 guests