Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
293 views
in Technique[技术] by (71.8m points)

roku - How to use Deep linking in brightscript to communicate from one app to other

Is it possible to launch an app from other roku app by using deep linking?

I've read this roku's document
https://sdkdocs.roku.com/display/sdkdoc/External+Control+API#ExternalControlAPI-Deeplinkingtoachannel

but could not find the exact answer for my question. Can anyone help me?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Check this answer made by Nas Banov . Combine His answer with the documentation you already provided and you will be able to launch one Roku app from another with Deep Linking params. In short find out your device IP by creating roDeviceInfo and calling GetIPAddrs() on it. Now when you have device IP, create roUrlTransfer and call setURL("http://your_IP:8060/launch/dev?contentID=13234&MediaType=season") after that just call PostFromString() . contentID and MediaType are Deep Linking parameters.

Nas Banov also explains what is "dev" in the setUrl() link, only with the different example(internal channel ID):

dev - in setUrl() function is internal channel ID, for public channels you can see it in the Channel Store URL of the channel details.

I have made a GITHUB repo that you can check. It will not launch channel with deeplinking params by default (it can but you will have to replace request URL and add the one from this answer) but it will launch Roku channel from within another Roku channel. Also you can check my post on dev.to for a detailed explanation.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...