"ashishtr" wrote:
...
So I tried to use the ECP command 'input', it opens & plays for the first time, but later it doesn't do anything when the app is running.
Do I need to do some special handling in my Roku app to handle 'input' command?
It is admittedly cryptic, but this is described in the documentation:
https://sdkdocs.roku.com/display/sdkdoc ... ontrol+API"The external control server places these name-value pairs into an associative array, and passes them directly through to the currently executing channel script using a Message Port attached to a created roInput object."
...
"Messages of type roInputEvent have a GetInfo() method that will obtain the associative array."
To paraphrase, your application needs to create a global roInput object, and set its message port to one that your application is always monitoring (whether it be in a main event loop or in a task event loop).
When the ECP input command for your app is processed by the firmware, if your app is already running it will be sent an roInputEvent event with the parameters in the event, equivalent to the main launch parameters.
It's then up to your app to handle roInputEvent appropriately, e.g. navigating to the target content springboard in the browse UI.