I am getting the following message on the static analysis page:
"Channels are required to support roInput events. Please ensure your manifest includes the supports_input_launch=1 entry and your channel properly handles roInput events."
I have supports_input_launch=1 in the manifest. I also have implemented deep linking, both launch and input types. I still however get the error on the static analyzer page.
Hmm... I've been adding an "input" task to get around it in my apps. I forget where I got it, but it's nothing more than these two files in my "components" directory.
inputTask.xml:
<?xml version="1.0" encoding="UTF-8"?>
<component name="inputTask" extends="Task">
<interface>
<field id="inputData" type="assocarray" />
</interface>
<script type="text/brightscript" uri="pkg:/components/inputTask.brs" />
</component>
inputTask.brs:
Sub Init()
m.top.functionName = "ListenInput"
End Sub
Function ListenInput()
port=createobject("romessageport")
InputObject=createobject("roInput")
InputObject.setmessageport(port)
while true
msg=port.waitmessage(500)
if type(msg)="roInputEvent" then
print "INPUT EVENT!"
if msg.isInput()
inputData = msg.getInfo()
'print inputData'
for each item in inputData
print item +": " inputData[item]
end for
' pass the deeplink to UI
if inputData.DoesExist("mediaType") and inputData.DoesExist("contentID")
deeplink = {
id: inputData.contentID
type: inputData.mediaType
}
print "got input deeplink= "; deeplink
m.top.inputData = deeplink
end if
end if
end if
end while
End Function
Since I've mostly created games, it doesn't really apply to my apps, but I need to get past this requirement nonetheless.
Do you ever create an roInput object and check for an roInputEvent message type in your code? I think that's what it's looking for.
I have done both and the channel still fails the static analysis.
Hmm... I've been adding an "input" task to get around it in my apps. I forget where I got it, but it's nothing more than these two files in my "components" directory.
inputTask.xml:
<?xml version="1.0" encoding="UTF-8"?>
<component name="inputTask" extends="Task">
<interface>
<field id="inputData" type="assocarray" />
</interface>
<script type="text/brightscript" uri="pkg:/components/inputTask.brs" />
</component>
inputTask.brs:
Sub Init()
m.top.functionName = "ListenInput"
End Sub
Function ListenInput()
port=createobject("romessageport")
InputObject=createobject("roInput")
InputObject.setmessageport(port)
while true
msg=port.waitmessage(500)
if type(msg)="roInputEvent" then
print "INPUT EVENT!"
if msg.isInput()
inputData = msg.getInfo()
'print inputData'
for each item in inputData
print item +": " inputData[item]
end for
' pass the deeplink to UI
if inputData.DoesExist("mediaType") and inputData.DoesExist("contentID")
deeplink = {
id: inputData.contentID
type: inputData.mediaType
}
print "got input deeplink= "; deeplink
m.top.inputData = deeplink
end if
end if
end if
end while
End Function
Since I've mostly created games, it doesn't really apply to my apps, but I need to get past this requirement nonetheless.
Thank you. This solution worked.