Forum Discussion

ssaguiar's avatar
ssaguiar
Streaming Star
3 years ago

How to use parenteral control pinpad?

Hi to all

I wish to know where I can find any use example of a parenteral control using pinpad.

In my player I have, in xml:

<DynamicPinPad
    id = "parenteralPinPad" />
 
In the brightscript code I have:
 
At the start:
m.parenteralPinPad = m.top.findNode("parenteralPinPad")
 
then, when a channel is for adults, for example, I use:
 
if (videoGenre = "Adultos")
    m.Video.control = "stop"
    m.parenteralPinPad.text = ""
    showParenteralPinpad()
else
    playChannelVideo()
end if
 
And, in on onKeyEvent:
    if (key = "OK") then
        if (m.parenteralPinPad.visible = true) then
            if (len(m.parenteralPinPad.text) = 4) then
                 if(m.parenteralPinPad.text = m.global.ParenteralPassword)
                     m.channelIsAuthorized = true
                     hideParenteralPinpad()
                     playVideo()
            end if
        end if
        handled = true
    end if
 
return handled
 
The parenteral password is located on our server, for each user.
The user can change this password using the Android, the IOS ot the smart TV's - Samsung or LG apps.
 
I wish to know if it's mandatory to use the Roku device's pin number (in this case how to read it programatically)?
 
If not, can I use the approach I described above or do I need to implement all the parenteral pin classes and screens in my channel (one to change / update the pin which will be saved in the device's m.global variable)?
 
Can. you provide some examples and/or tutorials?
 
Thank you very much
 
 

3 Replies

  • renojim's avatar
    renojim
    Community Streaming Expert

    If it's not specifically mentioned in the certification criteria then I would say you can do whatever you want.  There's no way to get the user's Roku PIN that I know of or to verify that a PIN entered matches the Roku PIN, but I've never looked into it.  I wouldn't bother trying to handle managing the PIN on the device unless there's some mention of it in the certification criteria.  Since you can't manage your Roku PIN on the device I doubt you have to manage your channel's PIN on the device.

    Certification criteria | Roku Developer

    • ssaguiar's avatar
      ssaguiar
      Streaming Star

      Thank you my friend for your answer.

      The problem is that we must use some kind of parenteral protection and thus we use pin password to let user access adult or protected content. In this case we must have some kind of way to change the password pin number) in the channel.

      I will make some adjustments to have a pin change screen and another to ask for it when accessing this kind of content.

      Thank you very much for your help.