slingxshot
Streaming Star
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2018
10:59 AM
Restarting Application Issue
Hello,
I wrote a function to restart the app in main.brs. I call it from the main app. However, it sometimes works, sometimes doesn't. For example if I try it on a Wired connection, it works. On Wireless, it doesn't. However, it is not always true, sometimes it works on wireless with other devices. I have the latest Roku Premium box that was just released (large box).
Here is the code. It doesn't return me any errors. Function runs, but nothing happens when that URL is hit.
I wrote a function to restart the app in main.brs. I call it from the main app. However, it sometimes works, sometimes doesn't. For example if I try it on a Wired connection, it works. On Wireless, it doesn't. However, it is not always true, sometimes it works on wireless with other devices. I have the latest Roku Premium box that was just released (large box).
Here is the code. It doesn't return me any errors. Function runs, but nothing happens when that URL is hit.
sub restartApp()
print "restartApp()"
appId = createObject("roAppInfo").getID()
uri = "http://localhost:8060/launch/"+appId+"?restart=true"
launchRequest = createObject("roUrlTransfer")
launchRequest.setUrl(uri)
launchRequest.postFromString("")
print "restartAppComplete()"
end sub
2 REPLIES 2
manishDev
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2018
02:18 PM
Re: Restarting Application Issue
DId you ever find a solution? I would guess it is probably because of loalhost thing. You might want to get the local ip address of the device and use that.
peterson79
Newbie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2021
11:48 AM
Re: Restarting Application Issue
Hi,
As I understand ECP has been deprecated from "in app". Is there another way to restart the app programmatically?