Your Digital Media Has Never Looked So Good

 
ttruecaller
Topic Author
Posts: 3
Joined: Mon Apr 22, 2019 9:47 pm

serial number of the device

Tue Apr 23, 2019 9:08 am

hi,

what function i need to call to get serial number if the device .

thanks
 
destruk
Posts: 2710
Joined: Sat Dec 18, 2010 4:58 pm

Re: serial number of the device

Tue Apr 23, 2019 1:18 pm

di=createobject("roDeviceInfo")
identifier=di.GetChannelClientId()


GetDeviceUniqueId() as String
Returns the serial number of the unit running the script. This is a 12 character alphanumeric string. While this value was traditionally used to uniquely identify a device, we now recommend using the publisher ID for this purpose.

GetDeviceUniqueID() is deprecated and will be removed from the firmware in the Spring 2019 OS update. Developers must update their channels to use the 12-character alphanumeric unique identifier returned by GetChannelClientId()

https://sdkdocs.roku.com/display/sdkdoc/ifDeviceInfo
 
ttruecaller
Topic Author
Posts: 3
Joined: Mon Apr 22, 2019 9:47 pm

Re: serial number of the device

Tue Apr 23, 2019 7:25 pm

i am getting 8-4-4-4-12 digit code while using the following function

di=createobject("roDeviceInfo")

identifier=di.GetChannelClientId()
 
destruk
Posts: 2710
Joined: Sat Dec 18, 2010 4:58 pm

Re: serial number of the device

Tue Apr 23, 2019 8:09 pm

Roku has changed this system multiple times, so that isn't surprising they wouldn't update the documentation.  You can understand the reasoning as to why they don't want you to rely on a static permanent unchanging reference to an individual roku box that survives a factory default and transfer of the unit to another person that might install your channel app and allow them use of that previous owner's credit card or roku account in some fashion.  Using the serial number or other unchanging data should not be an imperative feature of your channel code, but what they currently supply is this if you absolutely must have some functionality and wish the channel to be publicly certified no matter what it returns.
 
ttruecaller
Topic Author
Posts: 3
Joined: Mon Apr 22, 2019 9:47 pm

Re: serial number of the device

Tue Apr 23, 2019 10:19 pm

We were using the publisher ID in place of GetDeviceUniqueId() to get the serial number of the unit running the script which is a 12 character alphanumeric string. For publisher ID also we were getting 8-4-4-4-12 result only & also warning us this will be deprecated. Please help us in resolving this.
 
User avatar
speechles
Posts: 153
Joined: Thu Aug 06, 2015 11:15 pm

Re: serial number of the device

Tue Apr 23, 2019 10:50 pm

di=createobject("roDeviceInfo")
uniqueid = di.GetChannelClientId()
friendlyname = di.GetFriendlyName()

along with..

if NOT di.isRIDADisabled()
    rida = di.GetRida()
else
   rida = "<UNAVAILABLE>"
end if

Use some variety of the uniqueid their friendlyname and the rida if it is available. Then you comply with EU terms/law in those regions. Those other identifiers are deprecated for a reason. You must stop using them. 

Who is online

Users browsing this forum: No registered users and 7 guests