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: 
cpjamloki
Visitor

roSearchScreen -> isScreenClosed()

Hi,

Roku ByDefault define Button UP and Back Button(2 and 0) for isScreenClosed() in roSearchScreen.

and there is no method for getting button index which is left side(msg.isButtonInfo()->msg.GetIndex() work for only right side).

In Non-legacy device case it is looking odd search box is closing on Up key also.

please suggest me how i can solve this Or how i can get button index for left side keyboard(for search screen) instead of use isScreenClosed().

Thanks in advance
(Chandra Prakash)
0 Kudos
12 REPLIES 12
cpjamloki
Visitor

Re: roSearchScreen -> isScreenClosed()

If Anybody have any idea please share.
0 Kudos
destruk
Binge Watcher

Re: roSearchScreen -> isScreenClosed()

What you could do is - check the search result.
ie

call your search routine as a function --
1) msg.isListItemSelected()
2) whatever check you use to determine it should pull up the search screen goes here
3) Result=SearchScreen()

Then for your search screen function return a value
Function SearchScreen() As String
If msg.isFullResult()
If LEN(msg.GetMessage())>0 Then Return msg.GetMessage() 'if the search term value is greater than 0 characters, then return the search term to the calling function

And then jumping back up to the calling function,
4) If (Result<>invalid And LEN(Result)>0) Then
display the search results
else
screen was closed with the back, cancel, or up button because the search term was 0 bytes in length
end if


Just a side note - no idea when this will happen but Roku did announce they are dropping support for these older generation 1 boxes - not going to allow new channels to be put into the channel store for them.
0 Kudos
Komag
Roku Guru

Re: roSearchScreen -> isScreenClosed()

The date has already passed IIRC
0 Kudos
cpjamloki
Visitor

Re: roSearchScreen -> isScreenClosed()

komag what do you mean by "The date has already passed IIRC" ?
0 Kudos
cpjamloki
Visitor

Re: roSearchScreen -> isScreenClosed()

Thanks destruk for reply .
Actually i am doing same thing. problem is that - how to catch individual index. suppose
i got 4 suggestion by searchPhrase.Len() > 2 like:
1) delhi
2)mumbai
3)kolkata
4)chennai

how to catch index 1) delhi which is in array 0 position. i want to block up button here.
__________________________________________________________________
In given keyboard by roku there is space key when we press it it gives " " . i want to block it also as validation purpose .
Can you suggest for this.
i am doing :-

if msg.isPartialResult()
searchPhrase = msg.GetMessage()
if (searchPhrase=" ")
screen.SetSearchTerms(history)
screen.SetSearchTermHeaderText(searchHeaderText)
screen.SetClearButtonEnabled(false)

end if
end if

but what about when user press 2 or 3 or 4 ....so on space before character . problem is that it count one character for space also when i do
if searchPhrase.Len() > 2

Thanks
(Chandra Prakash Jamloki)
0 Kudos
Komag
Roku Guru

Re: roSearchScreen -> isScreenClosed()

I just mean the cutoff date for supporting old "classic" Rokus has passed now, so we no longer have to worry about them.
0 Kudos
destruk
Binge Watcher

Re: roSearchScreen -> isScreenClosed()

Generally Prakesh, you don't want to deal with leading or trailing spaces for search terms. You can use .trim() to remove the leading/trailing spaces.
If all you want is to prevent it from accepting a search term with a leading space from a past history listing, then you can check the left character with this --

if msg.GetMessage().left(1)=" "

or

if result.left(1)=" "

or

result=result.trim()

Depending on what variable line you're working with.
0 Kudos
cpjamloki
Visitor

Re: roSearchScreen -> isScreenClosed()

Hi Komag,
Actually i am doing in Roku 2 and Roku 3 version 5.1 and 5.2 .
I just mean the cutoff date for supporting old "classic" Rokus has passed now, so we no longer have to worry about them.

I have also a legacy device 3.1 , is it passed now?
where I can find the complete details about cutoff date for supporting old Rokus?

Thanks 🙂
0 Kudos
cpjamloki
Visitor

Re: roSearchScreen -> isScreenClosed()

Thanks destruk for sharing your views.
0 Kudos