Bernie Reger
Bernie Reger

Reputation: 41

Roku Device Registration And Linking

I'm new to developing for Roku players and BrightScript. I've been reading through the SDK and forums to try and learn how to register and link a Roku player for a fee based channel or in-channel purchases. The SDK explains a very simple set of request and responses for pre-registration and device linking.

http://sdkdocs.roku.com/display/sdkdoc/Device+Registration+And+Linking

Request1
<preRegistration>
<deviceID>(unique id/serial number for the device) </deviceID>
<deviceTypeID>(optional opaque string identifying device type) </deviceTypeID>
<firmwareVersion>(optional major.minor.build) </firmwareVersion>
</preRegistration > 
Response
<result>
<status> success/failure </status>
<regCode> (small ~5 character code customer will enter onto web site) </regCode>
<retryInterval> (polling interval in secs to detect completion (e.g. 30)</retryInterval>
<retryDuration> (max duration in secs for retries (e.g. 900) ) </retryDuration>
</result>

However I haven't been able to find an example of the server side code to process the pre-reg and linking functionality, creating regCodes, etc. And of course, how does your channel know it has been registered the next time it executes.

Thanks in advance!

Upvotes: 1

Views: 1423

Answers (2)

Pieter Siekerman
Pieter Siekerman

Reputation: 461

The question of where to find example server side code is not specifically related to Roku or Brightscript, because this type of functionality can be built and made available through an API based on any server side environment (e.g. PHP, Node.js, etc).

How your channel knows it has been registered next time it executes, is by storing login session information in persistent storage until a user logs out or the session expires for another reason. In the case of Roku, that would be achieved through roRegistry and roRegistrySecion.

Upvotes: 1

Paras Nath Chaudhary
Paras Nath Chaudhary

Reputation: 876

This is a sample app that I got from Roku team.
Hope this helps:

https://www.dropbox.com/s/20fdw4mx1nykv7b/register.zip

Upvotes: 0

Related Questions