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

got register example working but... <SOLVED>

i got the example working but i am trying to figure out how to not go thru that process again if your already linked.

everytime I open up the channel it goes thru the whole process again.
0 Kudos
14 REPLIES 14
greubel
Visitor

Re: got register example working but...

After the first time and it's good, set a value in the registry and then test for it on the next access.
0 Kudos
FML2010
Visitor

Re: got register example working but...

How 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?
0 Kudos
greubel
Visitor

Re: got register example working but...

Read the section on the roRegistry
0 Kudos
FML2010
Visitor

Re: got register example working but...

i 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?
0 Kudos
greubel
Visitor

Re: got register example working but...

You should be calling the same routine that generated the original code. The "Get a New Code" implies that the first one wasn't any good and you need to generate another one.
0 Kudos
FML2010
Visitor

Re: got register example working but...

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!
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: got register example working but...

"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.
0 Kudos
FML2010
Visitor

Re: got register example working but...

THANKS!!!!

I have been trying this for weeks actually!!! now i know what i have done is right!!!

I cant thank you enough!!
0 Kudos
FML2010
Visitor

Re: got register example working but...

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!!
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.