Your Digital Media Has Never Looked So Good

 
Biju
Topic Author
Posts: 28
Joined: Sun Jan 15, 2012 10:07 pm

does anybody have the code for linking roku device to websit

Sun Jan 29, 2012 11:48 pm

does anybody have the code for linking roku device to website for restricting user to view my private channel
 
joetesta
Posts: 279
Joined: Wed Apr 20, 2011 11:48 am

Re: does anybody have the code for linking roku device to we

Mon Jan 30, 2012 4:26 pm

yes in the example applications that come with the SDK, look for the one called 'register' and merge it into your channel.
aspiring to become a valued community member
 
Biju
Topic Author
Posts: 28
Joined: Sun Jan 15, 2012 10:07 pm

Re: does anybody have the code for linking roku device to we

Mon Jan 30, 2012 10:52 pm

joetesta wrote:
yes in the example applications that come with the SDK, look for the one called 'register' and merge it into your channel.

How to merge it into my channel im? do you have the sample code for it?
 
joetesta
Posts: 279
Joined: Wed Apr 20, 2011 11:48 am

Re: does anybody have the code for linking roku device to we

Tue Jan 31, 2012 10:57 am

Biju wrote:
joetesta wrote:
yes in the example applications that come with the SDK, look for the one called 'register' and merge it into your channel.

How to merge it into my channel im? do you have the sample code for it?


the sample code is in the example application. for your custom app you probably have to figure it out or hire someone who can do it.
aspiring to become a valued community member
 
User avatar
destruk
Posts: 2135
Joined: Sat Dec 18, 2010 4:58 pm

Re: does anybody have the code for linking roku device to we

Tue Jan 31, 2012 12:25 pm

Or you could join the roku Premium Developer Program, where roku does all required linking and billing for you without you needing to have it in your app. Their cost is 30% of whatever you charge - last time I checked.
 
User avatar
RokuJoel
Posts: 1748
Joined: Mon Nov 14, 2011 5:22 pm

Re: does anybody have the code for linking roku device to we

Tue Jan 31, 2012 2:49 pm

Biju, here is a little thing I whipped up this morning which might solve your short-term private channel linking issue. I haven't tested it, but it should work:

On your website, you create a text file of all the serial numbers, each on its own line.
on the roku, In the very top of your channel, in sub main(), put in the following:

sub main()
    xfer=createobject("rourltransfer")
    xfer.seturl("http://mywebserver.com/serialnumbers.txt") 'the url and path to your file
    list=xfer.gettostring().tokenize(chr(10))
    di=createobject("rodeviceinfo")
    myserial=di.getdeviceuniqueID()
    ?myserial
    linked=false
    for each number in list
        if number.left(number.instr(chr(13)))=myserial or number=myserial then
            linked=true
        end if
    end for
    if linked=false then
        dialog=createobject("roonelinedialog")
        dialog.settitle("Serial number: "+myserial)
        ?"my SN=";myserial
        dialog.show()
        sleep(20000)
        dialog.close()
        return
    end if

end sub

Note that this has only been tested with a text file created by windows Notepad.

So essentially, if someone launches the app and their serial is not in your text file, it will display their serial number for 20 seconds and exit, otherwise, it should continue on to allow them access to your content.
 
Biju
Topic Author
Posts: 28
Joined: Sun Jan 15, 2012 10:07 pm

Re: does anybody have the code for linking roku device to we

Tue Jan 31, 2012 10:29 pm

RokuJoel wrote:
Biju, here is a little thing I whipped up this morning which might solve your short-term private channel linking issue. I haven't tested it, but it should work:

On your website, you create a text file of all the serial numbers, each on its own line.
on the roku, In the very top of your channel, in sub main(), put in the following:

sub main()
    xfer=createobject("rourltransfer")
    xfer.seturl("http://mywebserver.com/serialnumbers.txt") 'the url and path to your file
    list=xfer.gettostring().tokenize(chr(10))
    di=createobject("rodeviceinfo")
    myserial=di.getdeviceuniqueID()
    ?myserial
    linked=false
    for each number in list
        if number.left(number.instr(chr(13)))=myserial or number=myserial then
            linked=true
        end if
    end for
    if linked=false then
        dialog=createobject("roonelinedialog")
        dialog.settitle("Serial number: "+myserial)
        ?"my SN=";myserial
        dialog.show()
        sleep(20000)
        dialog.close()
        return
    end if

end sub

Note that this has only been tested with a text file created by windows Notepad.

So essentially, if someone launches the app and their serial is not in your text file, it will display their serial number for 20 seconds and exit, otherwise, it should continue on to allow them access to your content.

Thank you joel, but i didnt understand in which file on the roku i have to put these codes. is it in appmain.brs or somewhere else?
 
User avatar
RokuJoel
Posts: 1748
Joined: Mon Nov 14, 2011 5:22 pm

Re: does anybody have the code for linking roku device to we

Wed Feb 01, 2012 10:44 am

Depends on which sample application you based your project on. If it is the videoplayer example then it would go in appMain.brs, right at the top, immediately after Sub Main()

You have to have the serialnumbers.txt file on your server before you launch the project. It doesn't have to have any content yet, but it needs to be there.

- Joel
 
Biju
Topic Author
Posts: 28
Joined: Sun Jan 15, 2012 10:07 pm

Re: does anybody have the code for linking roku device to we

Thu Feb 02, 2012 12:18 am

RokuJoel wrote:
Depends on which sample application you based your project on. If it is the videoplayer example then it would go in appMain.brs, right at the top, immediately after Sub Main()

You have to have the serialnumbers.txt file on your server before you launch the project. It doesn't have to have any content yet, but it needs to be there.

- Joel

Than you Joel for supporting i'll try this sample. Thank you
 
bandal
Posts: 260
Joined: Sat Oct 15, 2011 2:17 pm

Re: does anybody have the code for linking roku device to we

Thu Feb 02, 2012 9:31 am

I can confirm it does work. Thanks
 
Biju
Topic Author
Posts: 28
Joined: Sun Jan 15, 2012 10:07 pm

Re: does anybody have the code for linking roku device to we

Sun Feb 05, 2012 12:15 am

yes it did. can i add youtube on my private channel?
 
bandal
Posts: 260
Joined: Sat Oct 15, 2011 2:17 pm

Re: does anybody have the code for linking roku device to we

Sun Feb 05, 2012 9:06 am

You can if you want. RateRix is one channel for that and is private.
 
YungBlood
Posts: 132
Joined: Wed Jul 07, 2010 10:05 pm
Location: California
Contact:

Re: does anybody have the code for linking roku device to we

Sun Feb 05, 2012 1:51 pm

From what I understand, there are legal issues regarding youtube & ads. If you try play videos from youtube without displaying their ads, they get upset and can delete your account & videos. This has been discussed in much more detail in other theads.
YungBlood

Bringing more fun to Roku!
 
Biju
Topic Author
Posts: 28
Joined: Sun Jan 15, 2012 10:07 pm

Re: does anybody have the code for linking roku device to we

Mon Feb 06, 2012 10:30 pm

how can i add youtube as a category as other videos in my private channel

Who is online

Users browsing this forum: No registered users and 2 guests