allowed_list = "123456789abc 123456789ab1 123456789ab2 ..."
serNo = createObject("roDeviceInfo"). GetDeviceUniqueId()
if inStr(1, allowed_list, serNo) > 0 then ' yes, device is on the approved list
"EnTerr" wrote:
Since you will be making private channel, the mere "access/vanity code" to add it can be the secret shared only with the limited few friends. But, you can also do what you asked in three lines:
allowed_list = "123456789abc 123456789ab1 123456789ab2 ..."
serNo = createObject("roDeviceInfo"). GetDeviceUniqueId()
if inStr(1, allowed_list, serNo) > 0 then ' yes, device is on the approved list
Now, that's fine for a "toy channel" like this but let me disclaim that hacks like this should not be used for public channels: one, using S/N is discouraged (people sell/gift players, get new ones etc); two, hard-coding it like that is a pain to update the list - have to push new version.
allowed_list = "123456789abc 123456789ab1 123456789ab2 ..."
serNo = createObject("roDeviceInfo"). GetDeviceUniqueId()
if inStr(1, allowed_list, serNo) > 0 then
'******************************************************
' Set up the category feed connection object
' This feed provides details about top level categories
'******************************************************
Function InitCategoryFeedConnection() As Object
conn = CreateObject("roAssociativeArray")
conn.UrlPrefix = "http://pastebin.com/raw"
conn.UrlCategoryFeed = conn.UrlPrefix + "/Wed454XXX"
conn.Timer = CreateObject("roTimespan")
conn.LoadCategoryFeed = load_category_feed
conn.GetCategoryNames = get_category_names
print "created feed connection for " + conn.UrlCategoryFeed
return conn
End Function
else
Function InitCategoryFeedConnection() As Object
conn = CreateObject("roAssociativeArray")
conn.UrlPrefix = "http://pastebin.com/raw"
conn.UrlCategoryFeed = conn.UrlPrefix + "/blankpage"
conn.Timer = CreateObject("roTimespan")
conn.LoadCategoryFeed = load_category_feed
conn.GetCategoryNames = get_category_names
print "created feed connection for " + conn.UrlCategoryFeed
return conn
End Function
"EnTerr" wrote:
Oh boy.
When i answered, i assumed you already know some on how to develop on Roku. (My apologies, can't teach you in a paragraph how to do that)
I don't know at all RokuCo's examples - but putting above inside main() seems about right - because that's where everything is started from. Let's say in the beginning - and being absolutely minimalistic, the "if" should change to say "if inStr(1, allowed_list, serNo) < 1 then STOP"