我需要幫助理解深度鏈接,因爲我們的Roku場景圖應用程序已被Roku拒絕。如何在Roku SG應用程序中實現深層鏈接?
Roku在此解釋深度鏈接:https://sdkdocs.roku.com/display/sdkdoc/Deep+Linking,但本文檔並未詳細說明有關深度鏈接的所有信息。例如,我們如何獲取contentId和mediaType?
這裏是我們main()
功能上推出運行:
function main(args as Dynamic) as Void
print "args" args
if (args.ContentId <> invalid) and (args.MediaType <> invalid)
if (args.mediaType = "season")
HomeScreen()
end if
end if
end function
應用程序啓動後,我們打印指定參數時,我們得到這個關聯數組。但是,這並不顯示任何contentId和mediaType。
<Component: roAssociativeArray> =
{
instant_on_run_mode: "foreground"
lastExitOrTerminationReason: "EXIT_UNKNOWN"
source: "auto-run-dev"
splashTime: "1170"
}
使用這個curl命令,應用程序啓動成功顯示了內容識別和mediaType的:
curl -d "" "http://10.1.1.114:8060/launch/dev?contentID=e59066f501310da32b54ec0b64319be0&MediaType=season"
請幫助我們,並提供一個更好的例子來理解和容易實現深度鏈接。