Forum Discussion
11 Replies
- FML2010VisitorHow do you do that?
is that the "regristration token"?
also can that token be any length and numbers and letters or are there strict standards to this? - FML2010Visitori have been reading that, can you tell me where it answer these questions because i dont see it there anywhere
edit: I also can't seem to "get a New code" when i click the button... im assuming it has to do with the example not being complete? - FML2010VisitorOk the issue seems to be with the register example....
when i load the register example, it will link my roku, when i go to click on the images, it will go back to the registration screen.
so it is not saving the token that my site is sending back. All i did was change the
UrlGetRegCode and m.UrlGetRegResult links to some on my site and of course m.UrlBase to my site
the second issue seems to be what is correct, in the registration example:
the register example says : regToken .... but the linking docs says : deviceToken
when i use regToken it says its linked! But then when i come back its not saved at all. and i have to do it again.
if i go back and use JUST the original register example it does the same thing, it will say your linked and every time you try to look at the images or come back again, it will not say you are already a user, it will go thru the whole process again! so its not saving the token.
what needs to be done to the registration example, to save the user so it doesnt need to do this over and over? that way i can at least test my webserver code to see if its working at least!
Thanks I think its almost there! - RokuChrisRoku Employee
"FML2010" wrote:
Ok the issue seems to be with the register example....
when i load the register example, it will link my roku, when i go to click on the images, it will go back to the registration screen.
so it is not saving the token that my site is sending back. All i did was change the
UrlGetRegCode and m.UrlGetRegResult links to some on my site and of course m.UrlBase to my site
the second issue seems to be what is correct, in the registration example:
the register example says : regToken .... but the linking docs says : deviceToken
when i use regToken it says its linked! But then when i come back its not saved at all. and i have to do it again.
if i go back and use JUST the original register example it does the same thing, it will say your linked and every time you try to look at the images or come back again, it will not say you are already a user, it will go thru the whole process again! so its not saving the token.
what needs to be done to the registration example, to save the user so it doesnt need to do this over and over? that way i can at least test my webserver code to see if its working at least!
Thanks I think its almost there!
This happens because line 32 of regScreen.brs is commented out. In the sample channel, the token is being saved, it's just not being used to decide whether to go through the registration the next time the user selects a poster item. If you uncomment that line, the channel will no longer go through the registration screens if it has already been successfully registered. Instead it will do nothing when a poster item is selected. That is where you would need to invoke code to display your own content. - FML2010VisitorTHANKS!!!!
I have been trying this for weeks actually!!! now i know what i have done is right!!!
I cant thank you enough!! - FML2010Visitorgot another question...
how can i get the "get new code" to send the request back to the website for a new one?
i have had no luck with any Buttons doing anything i want them to do!! - RokuChrisRoku Employee
"FML2010" wrote:
got another question...
how can i get the "get new code" to send the request back to the website for a new one?
i have had no luck with any Buttons doing anything i want them to do!!
Button events are identified using the isButtonPressed() method on the event object. The code that handles the "get new code" button in the registration example is on line 75 of regScreen.brs. It changes the text on the registration screen to read "retrieving code..." and sets a flag getNewCode that causes the channel to break out of the "polling loop" and fall out to the main registration loop which starts the whole process over by fetching a new code. - FML2010VisitorThanks Chris already doing a great job as admin!!
- FML2010Visitorso here is what i did and not sure if is correct, can you check to see if this is correct and would this write to the registry?
elseif e.GetName() = "customerId" then
customerId = strtoi(e.GetBody())
RegWrite("customerId", customerId)
elseif e.GetName() = "type" then
userType = strtoi(e.GetBody())
RegWrite("userType", userType)
elseif e.GetName() = "creationTime" then
creationTime = strtoi(e.GetBody()) - RokuKevinVisitorI'm assuming you got RegWrite() from our utils.brs which does the Flush().... Then yes, you are saving customerId and type to the registry. In the code snippet you shared, you aren't saving creationTime to the registry.
--Kevin