Forum Discussion

elegantbanshee's avatar
elegantbanshee
Reel Rookie
2 years ago
Solved

Static Analysis: supports_input_launch=1

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 chan...
  • renojim's avatar
    renojim
    2 years ago

    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.