Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

keyboardDialog and pinDialog not responding to a back button press. Help would be appreciated!

I am unable to find any documentation about the back button press handling for these dialogs. I have checked in the onKeyEvent observer function for a back button key press, and never get the key press.

I am assuming this is default behavior, but is there a setting that changes the default behavior? I'm not seeing it in the docs.

0 Kudos
2 Replies
Highlighted
Level 19

Re: keyboardDialog and pinDialog not responding to a back button press. Help would be appreciated!

I don't know if you found anymore information, but I just ran into the same issue and came across this old discussion:  https://community.roku.com/t5/Roku-Developer-Program/Back-key-not-closing-RSG-Dialogs/td-p/454568

 

Basically a dialog isn't a dialog unless it's assigned to the scene's dialog parameter.  I think it's a bug for the back key to get silently eaten the way it is, but clearly Roku has no intention of changing the undocumented behavior or said documentation.

 

-JT

Highlighted

Re: keyboardDialog and pinDialog not responding to a back button press. Help would be appreciated!

The solution that I arrived at was creating a class of dialog that extends the dialog of the type you're needing, creating it with a boolean field and intercepting the onKeyEvent in that class. Then in the dialog that is a child of that class needs to set an observer on that field and hide and show itself accordingly. It's a ridiculous way of doing it, but it works, and that's Roku in a nutshell. It's also why I love Roku.

0 Kudos