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: 
philotas
Roku Guru

Deep Link: Search Results send input or launch event or both?

Since the Roku Mobile App is not available in my country and my device not supporting search on the device itself (because of my "other world" account I suppose), I need some help to figure out how deep links are actually implemented in the mobile app.

In general deep linking works when the app starts and it also works, when the app is already running, now that inside the manifest I activate deep linking with:

supports_input_launch=1

Now the app starts with the deep link when using  launch event and correctly shows the deep link while the app is running, when sending an input event using curl or the deep link test website.

When I send the input event while the app is not running, the app will not launch automatically so I assume that a mobile client before sending a deep link needs to figure out if it should send launch or input event?

That sounds a little complicated because it could just always send a launch event and the Roku OS could then figure out if the app is running or not and if supports_input_launch=1 is supported or not and if not it should relaunch the channel.

I am sure I am missing something but what I discovered using the tools the behaviour does not make sense to me.

Thanks for clarification!

0 Kudos
4 REPLIES 4
philotas
Roku Guru

Re: Deep Link: Search Results send input or launch event or both?

Update: I am seeing that the Roku Deep Link Tester Tool, does not contain the Channel ID when sending the input Event, this of course is the reason the channel does not start automatically.

http://<ROKU_IP>:8060/input?contentid...

vs:

http://<ROKU_IP>:8060/input/dev?contentid...

 

But the question is still the same: What does a mobile App do?

I guess it always sends an input Event with the ChannelID in the URL and so the deep link works when the channel is running and when it is not running?

 

The Docs however say, that the input command does not need the channel, id so using input is kind of undocumented behaviour...

 

 

0 Kudos
necrotek
Roku Guru

Re: Deep Link: Search Results send input or launch event or both?

A mobile app can send these as ECP commands https://developer.roku.com/en-gb/docs/developer-program/debugging/external-control-api.md 

You could build your own mobile app to control a Roku device with this info. You can probably also find other apps not made by Roku that do this as well. 

'input/install/launch' will need a channel id unless it is a sideloaded channel in which case use 'dev'.

This might help explain deeplinking https://rokulikeahurricane.io/handling_roInputEvent 

If you are building a mobile app that you are launching content to play on Roku.

You can query the Roku device to determine if the channel is installed

http://<ROKU_IP>:8060/query/apps

and if it is running

http://<ROKU_IP>:8060/query/active-app

 if result matches your channel id

0 Kudos
philotas
Roku Guru

Re: Deep Link: Search Results send input or launch event or both?

@necrotek thanks for your answer.

I do not want to build a mobile app myself but want to know, how the official Roku Mobile app works regarding deep linking and the current state of the app since I cannot download the Roku App myself.

I need to implement deep linking (while app is running) for our current app.

 


@necrotek wrote:

'input/install/launch' will need a channel id unless it is a sideloaded channel in which case use 'dev'.


Needing is a channel id is not true for the input command since without the input command it is send to the currently running channel and also Roku does not use them in their example (not a deep link example I know).

$ curl -d '' "http://$ROKU_DEV_TARGET:8060/input?acceleration.x=0.0&acceleration.y=0.0&acceleration.z=9.8"

 So my question is basically if the official Roku Mobile App does what you suggests for deep linking:

Something like this:

1) deep link clicked

2) Roku Mobile App querys currently active app

3.a) If app is not running: sends launch event with deep link data

3.b) If app is running: sends input event with deep link data

Or the app could not care about whether the app is running or not and send the input Event always along with the channel ID which would in my test also launch the channel.

This might be nothing I need to worry around when implementing the channel side of deep linking, but I still would like to understand it completely.

 

 

0 Kudos
philotas
Roku Guru

Re: Deep Link: Search Results send input or launch event or both?

Anybody from Roku here who can answer?

Maybe one could be invited to be a tester for the Roku iOS App in order to test deep linking with the official app?

0 Kudos
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.