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: 
1024Tech
Visitor

Little help needed on the roSearchScreen

Hi everyone,

I am trying to implement roku search functionality using the suggestions from the component reference guide and this post( http://forums.roku.com/viewtopic.php?f=34&t=30099&p=184075&hilit=rosearchscreen#p184075) by roku team.

I was able to retrive the searchresults from the server, parse it in to roArray. But I am not able to get to display them on the 'roPosterScreen'. I am not sure why the posterscreen is not displaying. Below is the code i am using.

Could anybody shed some light on this as I am stuck here forever trying to figure out what is preventing 'roPosterScreen' from being displayed?


function GenerateSearchResults(partSearchText As String, screen As Object)
posterScreen = preShowPosterScreen("Search", "")
searchResults=getShowsBySearch(partSearchText)
showPosterScreenForSearch(posterScreen, searchResults)
End function

Function showPosterScreenForSearch(screen As Object, searchResults As Object) As Integer
if validateParam(screen, "roPosterScreen", "showPosterScreenForSearch") = false return -1
if validateParam(searchResults, "roArray", "showPosterScreenForSearch") = false return -1
'printList(searchResults)
screen.SetContentList(searchResults)
screen.Show()
End function
0 Kudos
6 REPLIES 6
belltown
Roku Guru

Re: Little help needed on the roSearchScreen

Are you sure getShowsBySearch is returning a valid content list?
0 Kudos
1024Tech
Visitor

Re: Little help needed on the roSearchScreen

"belltown" wrote:
Are you sure getShowsBySearch is returning a valid content list?

Thanks for your reply #belltown.
Yes! I am getting a 'roArray' of showList on calling getShowsBySearch(searchtext) method.
I was able to print the showlist using PrintList() utility in the video player example.
0 Kudos
belltown
Roku Guru

Re: Little help needed on the roSearchScreen

Can you post an example of the output you got when you printed the list?
0 Kudos
1024Tech
Visitor

Re: Little help needed on the roSearchScreen

"belltown" wrote:
Can you post an example of the output you got when you printed the list?


Belltown, Below is the List with 2 items in it....

FYI,I checked the lists that i set as content to the roPosterScreen at other places my applications. They format looks same the one I posted below.


---- list ----
List(0)= (assocarr)...
starrating: 90
hdbifurl:
shortdescriptionline2:
shortdescriptionline1: ItemName
contentid: 24
sdbifurl:
categories: (list of 1)...
List(0)=
sdposterurl: PosterURL
description: DescriptionHere
ishd: false
genre:
hdimg: HDImageURL
streamformat: hls
contentquality: SD
streamurls: (list of 1)...
List(0)= http://StreamingURL.mp4
synopsis: Synpisi
streamqualities: (list of 1)...
List(0)= SD
runtime:
sdimg: SDImageURL
streambitrates: (list of 1)...
List(0)= 250
hdposterurl:HDPosterURL
title: ItemName
songsfeed:
contenttype: episode
hdbranded: false
actors: (list of 1)...
List(0)=


List(1)= (assocarr)...
starrating: 90
hdbifurl:
shortdescriptionline2:
shortdescriptionline1: ItemName2
contentid: 107
sdbifurl:
categories: (list of 1)...
List(0)=
sdposterurl: SDPOsterURL
description: DescriptionHere
ishd: false
genre:
hdimg:HDImageURL
streamformat: hls
contentquality: SD
streamurls: (list of 1)...
List(0)= StreamingURL.mp4
synopsis: Synopsis
streamqualities: (list of 1)...
List(0)= SD
runtime:
sdimg: SDImageURL
streambitrates: (list of 1)...
List(0)= 250
hdposterurl: HDPosterURL
title: Itemname
songsfeed:
contenttype: episode
hdbranded: false
actors: (list of 1)...
List(0)=
--------------
0 Kudos
1024Tech
Visitor

Re: Little help needed on the roSearchScreen

#Belltown,

Looks the there is some issue with my preShowPosterScreen() method.


I tried to isolate the code to display the roPosterScreen and it worked for me.
The following code worked for me. I sincerely appreciate your time and help. Thanks a lot.
I will post once i figure out the actual issue.


port1=CreateObject("roMessagePort")
screen1 = CreateObject("roPosterScreen")
screen1.SetMessagePort(port1)
screen1.showmessage("Retrieving")
screen1.SetListStyle("arced-landscape")

searchSuggestions1 = GenerateSearchSuggestions(fullResult, screen)
screen1.SetContentList(searchSuggestions1)
screen1.Show()
0 Kudos
belltown
Roku Guru

Re: Little help needed on the roSearchScreen

I think you might need:

screen1.ClearMessage ()


after the call to SetContentList
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.