Do you have to enable or allow Deep Linking?
So I'm in the process of recreating my channel that used to be Direct Publisher, and so far it's going great. I have my feed being read correctly and managed by a grid, with video play back. Great. Then I find out I have to implement Deep Linking.
I'm directly using the example code out of scenegraph-master-sample/DeepLinking, but I need some help debugging. I try to curl into my site as described in the docs, and it always just drops me on my main screen.
If I try dropping breadcrumbs in the main.brs, it looks like nothing ever comes back from my "wait" function:
? "Starting Event Loop"
while(true)
' waiting for events from screen
? "Waiting"
? m
msg = wait(0, m.port)
? "msg="
? msg
msgType = type(msg)
...
So in code like this snippet I'd see "Starting Event Loop", then "Waiting" and a dump of the m variable...but then, nothing. I run the curl, the app basically just starts over and spits out the same things. I never see "msg=".
Am I misunderstanding how that wait function works? I would think that maybe my app is terminated prematurely, but there's no output to that effect and it doesn't ever show any of my fallthrough breadcrumbs, either.
In the manifest I have supports_input_launch=1. Is there anything else at the app level I needed to updateto get input events flowing? I'll note that my app continues to work -- I can browse the grid and continue to play videos just fine.
Is m.port assigned to the roInput object you created? In that example, the pertinent lines are:
m.port = CreateObject("roMessagePort") inputObject=createobject("roInput") inputObject.setmessageport(m.port)
I haven't tried to run the example as is, but I can execute the lines in the debugger:
Brightscript Debugger> inputObject=createobject("roInput") Brightscript Debugger> port = CreateObject("roMessagePort") Brightscript Debugger> inputObject.setmessageport(port) Brightscript Debugger> msg=wait(0,port)
Then I execute the curl command:
curl -d "" "http://192.168.0.191:8060/input/dev?contentId=1234&mediaType=movie"
Result:
Brightscript Debugger> ?msg.getinfo() <Component: roAssociativeArray> = { contentId: "1234" mediaType: "movie" source_ip_addr: "192.168.0.118" }
If you have all of the pieces and you're not getting the wait to return I would suspect something about the curl command.