Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/DEVELOPER/dev-tools/external-control-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ The external control services provided by ECP are included in a simple RESTful A
</div></td><td class="long-line">Developer mode enabled<br /><br /><strong>Control by mobile apps</strong> setting "Enabled"</td></tr>
<tr><td class="long-line">query/app-object-counts/&lt;<em>channelId</em>&gt;<br /><br /><em>Available since <a href="https://developer.roku.com/dev/docs/release-notes#roku-os-130">Roku OS 13.0</a></em></td><td class="long-line">Returns the counts for the different BrightScript node objects in the app. This helps developers determine the counts of each type of object held by their Brightscript app.<br /><br />The app may either be a sideloaded app or an app from the Streaming Store. To output the results for an app in the app store, the device must be keyed with the same developer ID/key that was used to generate the package file.</td><td class="long-line">Developer mode enabled<br /><br /><strong>Control by mobile apps</strong> setting "Enabled"</td></tr>
<tr><td class="long-line">query/app-state/&lt;<em>appId</em>&gt;<br /><br /><em>Available since <a href="https://developer.roku.com/dev/docs/release-notes#roku-os-130">Roku OS 13.0</a></em></td><td class="long-line">Returns the current app state: "active", "background" (suspended; running in the background), or "inactive". <br /><br />The app may either be a sideloaded app or an app from the Streaming Store. To output the results for an app in the app store, the device must be keyed with the same developer ID/key that was used to generate the package file.<br /><br />If the app is not installed, this command returns an error.</td><td class="long-line">Developer mode enabled<br /><br /><strong>Control by mobile apps</strong> setting "Enabled"</td></tr>
<tr><td class="long-line">exit-app<br /><br />(POST request)<br /><br /><em>Available since <a href="https://developer.roku.com/dev/docs/release-notes#roku-os-130">Roku OS 13.0</a></em></td><td class="long-line">Suspends or terminates an app that is running: <br /><ul><li>If the app supports Instant Resume and is running in the foreground, sending this command suspends the app (the app runs in the background).</li><li>If the app supports Instant Resume and is running in the background or the app does not support Instant Resume and is running, sending this command terminates the app.</li></ul></td><td class="long-line">Developer mode enabled<br /><br /><strong>Control by mobile apps</strong> setting "Enabled"</td></tr>
<tr><td class="long-line">exit-app/&lt;<em>channelId</em>&gt;[/true]<br /><br />(POST request)<br /><br /><em>Available since <a href="https://developer.roku.com/dev/docs/release-notes#roku-os-130">Roku OS 13.0</a></em></td><td class="long-line">Suspends or terminates an app that is running: <br /><ul><li>If the app does not support Instant Resume and is running, sending this command terminates the app.</li><li>If the app supports Instant Resume and is running, sending this command suspends the app (the app runs in the background).</li><li>If the app supports Instant Resume and is running, sending this command with the optional <code>/true</code> parameter terminates the app (the app does not run in the background).</li></ul></td><td class="long-line">Developer mode enabled<br /><br /><strong>Control by mobile apps</strong> setting "Enabled"</td></tr>
<tr><td class="short-line">input</td><td class="long-line">Sends custom events to the current application. It takes a user defined list of name-value pairs sent as query string URI parameters. The external control server places these name-value pairs into an associative array, and passes them directly through to the currently executing app script using a Message Port attached to a created roInput object.<br /><br />[Input Command Conventions](doc:external-control-api#input-command-conventions) includes detailed recommendations on how to pass your data.<br /><br />Messages of type [roInputEvent](doc:roinputevent) have a GetInfo() method that will obtain the associative array. The arguments must be URL-encoded. <br /><br />This command is sent using an HTTP POST with no body. Example: <code>POST /input?acceleration.x=0.0&acceleration.y=0.0&acceleration.z=9.8</code></td><td class="short-line" /></tr>
</tbody>
</table>
Expand Down Expand Up @@ -619,10 +619,10 @@ The response includes the following fields:

#### exit-app example

The following command suspends or terminates an app that is running.
The following command suspends or terminates an app that is running. The optional `/true` parameter will force the termination of the app even if it supports instant-resume. Without this, an instant-resume channel will remain running in the background.

```bash
$ curl -d '' "http://$ROKU_DEV_TARGET:8060/exit-app/<channelId>"
$ curl -d '' "http://$ROKU_DEV_TARGET:8060/exit-app/<channelId>[/true]"
```

This command returns an HTTP 200 success code if the app was active or suspended. It returns an HTTP 404 (Not Found) error if the app was not running.
Expand Down
Loading