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

roCodeRegistrationScreen isKeyPressed() work around?

Hi,
I've got a quick one.

I'm working with a roCodeRegistrationScreen http://sdkdocs.roku.com/display/sdkdoc/roCodeRegistrationScreen. For demo purposes, I need a way of bypassing the code registration process by a remote key press.

Due to the restrictions of the roCodeRegistrationScreen object, I can only detect an event triggered by:

    - a timer running out


Is there any way to detect a remote key process, whilst having a roCodeRegistrationScreen on screen.
Essentially. From a roCodeRegistrationScreen, I want to press the * remote key and progress to the next screen.


Cheers
0 Kudos
6 REPLIES 6

Re: roCodeRegistrationScreen isKeyPressed() work around?

No event is generated for any key press on roCodeRegistrationScreen as far as I know. So probably you wouldn't be able to do it using * button. But I have seen other channels to add a button for demo (I think you are talking about displaying demo content to user instead of self testing the application?) on roCodeRegistrationScreen (Vevo does so as far as I remember). For example you can add two buttons on roCodeRegistrationScreen titled "Get a new code" and 2nd "Continue without logging in" and if user selects 2nd button you can carry on to displaying demo content. As for these button isButtonPressed() will be fired.
0 Kudos
TheEndless
Channel Surfer

Re: roCodeRegistrationScreen isKeyPressed() work around?

Have you tried listening for the isButtonInfo() event? Not sure if that works on the roCodeRegistrationScreen or not, but some screens raise it instead of isRemoteKeyPressed() for the * button.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
tim_a_lacey
Visitor

Re: roCodeRegistrationScreen isKeyPressed() work around?

"scorpiontahir02" wrote:
No event is generated for any key press on roCodeRegistrationScreen as far as I know. So probably you wouldn't be able to do it using * button. But I have seen other channels to add a button for demo (I think you are talking about displaying demo content to user instead of self testing the application?) on roCodeRegistrationScreen (Vevo does so as far as I remember). For example you can add two buttons on roCodeRegistrationScreen titled "Get a new code" and 2nd "Continue without logging in" and if user selects 2nd button you can carry on to displaying demo content. As for these button isButtonPressed() will be fired.


I have implemented that solution, however my client wants a method that doesn't impact on visual layout.

I have also implemented a solution that progresses to the next screen based on the number of times the user has re-generated a code i.e. pressed a "Generate a new code" button. This doesn't impact on the visual layout, but my client wants to associate this demo transition with A or B remote key press. I know this sounds simple, and should be simple, but the limitation of the template screens introduces complexity.
0 Kudos
belltown
Roku Guru

Re: roCodeRegistrationScreen isKeyPressed() work around?

roImageCanvas might be the way to go then.
0 Kudos

Re: roCodeRegistrationScreen isKeyPressed() work around?

"tim.a.lacey" wrote:


I have implemented that solution, however my client wants a method that doesn't impact on visual layout.

I have also implemented a solution that progresses to the next screen based on the number of times the user has re-generated a code i.e. pressed a "Generate a new code" button. This doesn't impact on the visual layout, but my client wants to associate this demo transition with A or B remote key press. I know this sounds simple, and should be simple, but the limitation of the template screens introduces complexity.

Best choice for you is to make your client understand limited functionality of roCodeRegistrationScreen and add a button on screen for demo purpose like other well known channels do. Other choice is, you will have to design a custom screen yourself that looks like roCodeRegistrationScreen (in look or functionality or both) but does additionally what you want it to do (demo with * button) using either roImageCanvas or roScreen. But It will take some effort and time and you will have to understand roImageCanvas or roScreen a little bit if you have not used them in past.
0 Kudos

Re: roCodeRegistrationScreen isKeyPressed() work around?

"TheEndless" wrote:
Have you tried listening for the isButtonInfo() event? Not sure if that works on the roCodeRegistrationScreen or not, but some screens raise it instead of isRemoteKeyPressed() for the * button.

roCodeRegistrationScreen does not trigger any event on any button press (of course it will trigger for OK button when some on screen button is selected but not for any other button), not even for UP and Down buttons when pressed for navigation between on screen buttons as far as I have tested it. So wait() is never interrupted even not with Invalid msg.
0 Kudos