Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
elegantbanshee
Reel Rookie

Static Analysis: supports_input_launch=1

Jump to solution

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.

0 Kudos
1 Solution

Accepted Solutions
renojim
Community Streaming Expert

Re: Static Analysis: supports_input_launch=1

Jump to solution

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.

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.

View solution in original post

4 REPLIES 4
renojim
Community Streaming Expert

Re: Static Analysis: supports_input_launch=1

Jump to solution

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.

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
elegantbanshee
Reel Rookie

Re: Static Analysis: supports_input_launch=1

Jump to solution

I have done both and the channel still fails the static analysis.

0 Kudos
renojim
Community Streaming Expert

Re: Static Analysis: supports_input_launch=1

Jump to solution

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.

Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
elegantbanshee
Reel Rookie

Re: Static Analysis: supports_input_launch=1

Jump to solution

Thank you. This solution worked.

0 Kudos