Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
rontom974
Level 7

Show Roku Serial Number in XML

hi guys,
i'm developing a small roku application. i want to put the device serial number of the client for authorization.
once the user open the xml with device serial , it will check check if that particular serial number exist in our mysql database.

so i want to show it like this

http://www.lazygeekclub.com/lazyvideosroku.php?id=xmlfiles@lazyvideos&deviceid=XXXXX <-- here need to show the roku serial


here is my bright script code

Function livechannel(id as string, title as string)
screenFacade = CreateObject("roPosterScreen")
screenFacade.show()
if id = "1"
UA_trackPageview("/Lazy_Videos_Part_1")
liveurl = "http://www.lazygeekclub.com/lazyvideosroku.php?id=xmlfiles@lazyvideos&deviceid=XXXXX"
else if id = "2"
UA_trackPageview("/Lazy_Videos_Part_2")
liveurl = "http://www.lazygeekclub.com/lazyvideosroku.php?id=xmlfiles@lazyvideos2&deviceid=XXXXX"

this = {
topics: livedata(liveurl)
}
port = CreateObject("roMessagePort")
poster = CreateObject("roPosterScreen")
poster.SetMessagePort(port)
poster.SetBreadcrumbText(title+" Live Channels","")
poster.SetListStyle("arced-landscape")
poster.SetListDisplayMode("photo-fit")
poster.SetContentList(this.topics)
poster.Show()
While True
msg = wait(0, port)
If msg.isScreenClosed() Then
return -1
Else If msg.isListItemSelected()
lang = this.topics[msg.GetIndex()]
livesingle(this.topics[msg.GetIndex()],this.topics,msg.GetIndex())
End If
End While
End Function
0 Kudos
2 Replies
RokuMarkn
Level 7

Re: Show Roku Serial Number in XML

roDeviceInfo.GetDeviceUniqueId returns the serial number.

However you should read https://sdkdocs.roku.com/display/sdkdoc ... gistration and https://sdkdocs.roku.com/display/sdkdoc ... nd+Linking. Using the device serial number for authorization is strongly discouraged. Among other issues, it makes it impossible to de-authorize device, it makes the authorization carry along with the device if it is sold to another person, and it means factory reset doesn't restore the device to a pristine condition if they later reinstall your channel.

--Mark
0 Kudos
rontom974
Level 7

Re: Show Roku Serial Number in XML

hi i get that.
can you tell me where to place the device id
can you code it for me ?
0 Kudos