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: 
brybott
Level 7

roDeviceInfo methods not working for me

Hello,
I'm having an issue with the following ifDeviceInfo methods:

GetAdvertisingId() as String
IsAdIdTrackingDisabled() as Boolean

Here is some very simple code demonstrating how I'm trying to use them within my channel.

di = CreateObject("roDeviceInfo")
if (not di.IsAdIdTrackingDisabled())
rokuAdId = di.GetAdvertisingId()
end if


However, when I run the code, I get the following error:

Member function not found in BrightScript Component or interface. (runtime error &hf4) in ...kUd/pkg:/source/Ads.brs(105)
105: rokuAdId = di.IsAdIdTrackingDisabled()


Also, when doing some additional testing, I get the following error if I omit the if statement with the IsAdIdTrackingDisabled() method:


Member function not found in BrightScript Component or interface. (runtime error &hf4) in ...kUd/pkg:/source/Ads.brs(105)
105: rokuAdId = di.GetAdvertisingId()


I'm not sure if firmware version is the same as the software version that displays in the About option on the roku, but the software version is 5.6 build 60. Additionally, I'm able to utilize GetCountryCode() which should mean that I have at least firmware version 4.3.

This is a link the documentation that says I should be able to use these methods:
http://sdkdocs.roku.com/display/sdkdoc/ ... IdasString

Any insight/help/ideas/anything would be appreciated. Thanks.
0 Kudos
14 Replies
Roku Employee
Roku Employee

Re: roDeviceInfo methods not working for me

"brybott" wrote:

I'm not sure if firmware version is the same as the software version that displays in the About option on the roku, but the software version is 5.6 build 60.


These APIs are new with firmware version 6.1. It seems there has been a delay in the 6.1 rollout so the API documentation is premature.
Apologies for the inconvenience.
0 Kudos
brybott
Level 7

Re: roDeviceInfo methods not working for me

Thank you for the information.

A suggestion:
The documentation says "This function is not available in the 3.1 firmware version." which is not very helpful.

It might be more helpful if you added these functions to a section of the page labeled "Since Firmware version 6.1:", similar to the section that says "Since Firmware version 4.3:" towards the bottom of the page.
0 Kudos
pbreit
Level 7

Re: roDeviceInfo methods not working for me

"This function is not available in the 3.1 firmware version." which is not very helpful.


This was confusing to me because typically this type of message indicates the function has been deprecated and is no longer available on versions including and after the version specified.
0 Kudos
TheEndless
Level 7

Re: roDeviceInfo methods not working for me

"pbreit" wrote:
"This function is not available in the 3.1 firmware version." which is not very helpful.


This was confusing to me because typically this type of message indicates the function has been deprecated and is no longer available on versions including and after the version specified.

Legacy players run the 3.1 and early firmware. That note indicates that the function is not available on legacy devices. Now that support has been dropped for legacy devices, it's inconsequential. It's mostly safe to assume all documented features are available on all non-legacy devices, since firmware updates are automatic.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
EnTerr
Level 8

Re: roDeviceInfo methods not working for me

"pbreit" wrote:
"This function is not available in the 3.1 firmware version." which is not very helpful.

You are right, the particular wording in that page is confusing - esp. if you haven't been around Roku documentation and forum for years, like TheEndless and me have. It would be better stated as "This function is available in firmware 6.1 and later".

Maybe RokuKC will fix it?
0 Kudos
TheEndless
Level 7

Re: roDeviceInfo methods not working for me

"EnTerr" wrote:
"pbreit" wrote:
"This function is not available in the 3.1 firmware version." which is not very helpful.

You are right, the particular wording in that page is confusing - esp. if you haven't been around Roku documentation and forum for years, like TheEndless and me have. It would be better stated as "This function is available in firmware 6.1 and later".

Maybe RokuKC will fix it?

That was kind of my point. I don't think the version it became available in is any longer necessary, since support for legacy devices has been dropped, and all supported devices should be on the most recent firmware.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
EnTerr
Level 8

Re: roDeviceInfo methods not working for me

"TheEndless" wrote:
That was kind of my point. I don't think the version it became available in is any longer necessary, since support for legacy devices has been dropped, and all supported devices should be on the most recent firmware.

RokuCo stopping to test and approve public channels for fw3 does not mean that the approx. ~1,000,000 legacy players have vanished and won't be used. One can still write and update private channels for them, it was explained. And if you personally have moved over to fw5+ long ago, that does not mean all bridges behind you should be burned. Actively removing version notes will be a dickish move.

Note i was not addressing you but pointing out the imprecise wording of the note. Btw, isn't NowTV stuck on something like fw4 - or was it only its home screen that stayed in legacy-look and insides fw is 6+?
0 Kudos
TheEndless
Level 7

Re: roDeviceInfo methods not working for me

"EnTerr" wrote:
RokuCo stopping to test and approve public channels for fw3 does not mean that the approx. ~1,000,000 legacy players have vanished and won't be used.

No, but it means you'll only be able to develop private channels for them, and most people who care enough to develop private channels that still support legacy devices are already aware of the limitations.
"EnTerr" wrote:
Actively removing version notes will be a dickish move.

If it were accurate, perhaps, but there are a ton of documented methods that don't indicate their version compatibility. Leaving in a handful is arguably worse than not documenting all of them.
"EnTerr" wrote:
Btw, isn't NowTV stuck on something like fw4 - or was it only its home screen that stayed in legacy-look and insides fw is 6+?

It was on 4.9, but it has since been updated.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
EnTerr
Level 8

Re: roDeviceInfo methods not working for me

"TheEndless" wrote:
... most people who care enough to develop private channels that still support legacy devices are already aware of the limitations.

Hm, it seems to me you are saying "frack those who want to write for firmware 3 and have no photographic memory" - but in nicer words, am i right? As an owner of non-eidetic memory, i disagree.


"EnTerr" wrote:
Actively removing version notes will be a dickish move.

If it were accurate, perhaps, but there are a ton of documented methods that don't indicate their version compatibility. Leaving in a handful is arguably worse than not documenting all of them.

By the same token, we should "arguably" get rid of car seat-belts and highway guard-rails. After all, they are only partial measures that create "false sense of security" and fatal accidents still keep happening, so why keep imperfect safety devices?

Of course best is to have full documentation. The next best thing is having some documentation (partial as it may be). Having none is the worst choice. Ditto about traffic safety - best would be a 100% no-accident guarantee. Yet practicality beats purity and we live with the next best thing - partial measures.
0 Kudos