Your Digital Media Has Never Looked So Good

 
User avatar
SolveLLC
Topic Author
Posts: 311
Joined: Mon Aug 02, 2010 1:38 pm

ECP install from channel store

Tue Nov 29, 2011 7:13 am

The ECP documentation gives the following for launching an app from the channel store. However, it does not explain how to get the "contentID" for an app that *is not* already installed on the Roku. How do I find the contentID for an app that is not already installed by the user? (Intent, clickable banner that says "Hey, install this channel", the user clicks and is taken to the specific app in the channel store for installation.).

# The following command will launch the channel store app (11) on the box with a contentID # equal to 14_e (the MLB app). You can get the plugin ID for your app using the /query/apps # example above. It returns the installed apps on a Roku box.
# This technique would be useful in creating clickable ads in a free “Lite” version of a paid # app. When a user clicks on the ad, the channel store page to purchase the full version
# could be launched.
% echo -e 'POST /launch/11?contentID=14_e HTTP/1.1\r\n\r\n' | ncat 192.168.1.114 8060
HTTP/1.1 200 OK
Content-Length: 0
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

Re: ECP install from channel store

Tue Nov 29, 2011 9:38 am

The ID is the same for all users, so whatever the ID is on your box is what it will be on any user's box.

-JT
 
User avatar
SolveLLC
Topic Author
Posts: 311
Joined: Mon Aug 02, 2010 1:38 pm

Re: ECP install from channel store

Tue Nov 29, 2011 12:27 pm

Here is the code I'm attempting to use.

Function BannerInstall() As String
ip = "127.0.0.1"
xfer = CreateObject("roURLTransfer")
ECPUrl= "http://127.0.0.1:8060/launch/11?contentID=1504"
xfer.SetURL(ECPUrl)
result = xfer.PostFromString("")
End Function

On the "Roku2 Firmware 4.1 2669" The channel store loads and displays the channel (1504) *only* if the channel is already installed on the device. If the channel is not installed on the device it just loads the channel store.

On the "Roku1 Firmware 3.1 1003", "Roku1 Firmware 3.0 2227", and "Roku1 Firmware 3.1 104" the above code crashes with :Type Mismatch. (runtime error &h18) in ...kg:/source/banner_control.brs(8)"
 
User avatar
TheEndless
** Valued Community Member **
Posts: 9231
Joined: Mon Oct 04, 2004 10:15 am
Location: US
Contact:

Re: ECP install from channel store

Tue Nov 29, 2011 1:14 pm

I didn't think 127.0.0.1 was supported... I wonder if that could be related to your type mismatch. Might work on 4.x but not 3.x. I use the roDeviceInfo to get the IP address of the box for posting the ECP command.

Here's how to get the content ID:
viewtopic.php?f=34&t=38977&p=257260#p258021
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)
 
User avatar
SolveLLC
Topic Author
Posts: 311
Joined: Mon Aug 02, 2010 1:38 pm

Re: ECP install from channel store

Tue Nov 29, 2011 2:45 pm

I tried roDeviceInfo as to pull and then parse the ip address. It has the same behavior.
 
RokuPatrick

Re: ECP install from channel store

Tue Nov 29, 2011 3:41 pm

There's a bug in the Roku2 channel store that causes only channels that appear in My Channels, Featured or one of the New/Most/Top categories to be able to launch to the Springboard. It's fixed in the next version of the Channel Store. ETA TBD.
 
User avatar
SolveLLC
Topic Author
Posts: 311
Joined: Mon Aug 02, 2010 1:38 pm

Re: ECP install from channel store

Tue Nov 29, 2011 6:14 pm

Thanks Patrick, that's pretty much what we're seeing. Any comment on why the code doesn't work on the 3.x series of firmware?
 
koshermetal
Posts: 18
Joined: Sat Oct 29, 2011 1:13 am
Location: United States
Contact:

Re: ECP install from channel store

Wed Nov 30, 2011 6:06 pm

SolveLLC wrote:
Here is the code I'm attempting to use.

Function BannerInstall() As String
ip = "127.0.0.1"
xfer = CreateObject("roURLTransfer")
ECPUrl= "http://127.0.0.1:8060/launch/11?contentID=1504"
xfer.SetURL(ECPUrl)
result = xfer.PostFromString("")
End Function

On the "Roku2 Firmware 4.1 2669" The channel store loads and displays the channel (1504) *only* if the channel is already installed on the device. If the channel is not installed on the device it just loads the channel store.


I'm trying to do the same thing. I would like to have a banner within our channel that provides a call to action to listen to our station using the TuneIn Radio Channel, and launched the Channel Screen from the Channel Store once selected (it's ok if it just loads the Channel Store only if the user doesn't already have TuneIn Radio installed.)

I know I have to get the content ID of the TuneIn channel, but will the example code above work for this?

Also, not sure if TuneIn has a way to send launch parameters so we can directly launch the station from our channel...but that would be cool also.

Anyone feel like helping us out?
Free 24/7 Metal radio via web or smartphone
www.koshermetal.com
 
User avatar
SolveLLC
Topic Author
Posts: 311
Joined: Mon Aug 02, 2010 1:38 pm

Re: ECP install from channel store

Thu Dec 01, 2011 7:01 pm

If you look at the code example I posted and read the ECP documentation its pretty simple to modify. However, keep in mind that until this bug that Patrick mentioned is worked out on the Roku2 (no idea what is going on with the Roku1) it's not going to work correctly at all.
 
RokuPatrick

Re: ECP install from channel store

Fri Dec 02, 2011 12:25 pm

koshermetal wrote:
SolveLLC wrote:
Here is the code I'm attempting to use.

Function BannerInstall() As String
ip = "127.0.0.1"
xfer = CreateObject("roURLTransfer")
ECPUrl= "http://127.0.0.1:8060/launch/11?contentID=1504"
xfer.SetURL(ECPUrl)
result = xfer.PostFromString("")
End Function

On the "Roku2 Firmware 4.1 2669" The channel store loads and displays the channel (1504) *only* if the channel is already installed on the device. If the channel is not installed on the device it just loads the channel store.


I'm trying to do the same thing. I would like to have a banner within our channel that provides a call to action to listen to our station using the TuneIn Radio Channel, and launched the Channel Screen from the Channel Store once selected (it's ok if it just loads the Channel Store only if the user doesn't already have TuneIn Radio installed.)

I know I have to get the content ID of the TuneIn channel, but will the example code above work for this?

Also, not sure if TuneIn has a way to send launch parameters so we can directly launch the station from our channel...but that would be cool also.

Anyone feel like helping us out?


I don;t think TuneIn yet supports the deep linking that would be required to launch the channel and start with a specific piece of content.
 
User avatar
TheEndless
** Valued Community Member **
Posts: 9231
Joined: Mon Oct 04, 2004 10:15 am
Location: US
Contact:

Re: ECP install from channel store

Fri Dec 02, 2011 12:38 pm

RokuPatrick wrote:
koshermetal wrote:
I'm trying to do the same thing. I would like to have a banner within our channel that provides a call to action to listen to our station using the TuneIn Radio Channel, and launched the Channel Screen from the Channel Store once selected (it's ok if it just loads the Channel Store only if the user doesn't already have TuneIn Radio installed.)

I know I have to get the content ID of the TuneIn channel, but will the example code above work for this?

Also, not sure if TuneIn has a way to send launch parameters so we can directly launch the station from our channel...but that would be cool also.

Anyone feel like helping us out?


I don;t think TuneIn yet supports the deep linking that would be required to launch the channel and start with a specific piece of content.

Assuming it's a standard mp3 stream, the SHOUTcast channel has launch parameters that could be used to play the station directly.
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)
 
YungBlood
Posts: 133
Joined: Wed Jul 07, 2010 10:05 pm
Location: California
Contact:

Re: ECP install from channel store

Mon May 14, 2012 12:16 pm

SolveLLC wrote:
Here is the code I'm attempting to use.

Function BannerInstall() As String
ip = "127.0.0.1"
xfer = CreateObject("roURLTransfer")
ECPUrl= "http://127.0.0.1:8060/launch/11?contentID=1504"
xfer.SetURL(ECPUrl)
result = xfer.PostFromString("")
End Function

I'm trying to use simIlar code. I'm pulling the true IP from deviceinfo. I tried /launch/12 (netflix) and it does nothing. I tried /launch/11?contentID=12 and is just flashes the splash screen for the store. I tried launching one of my private channels, and nothing... Any ideas?
YungBlood

Bringing more fun to Roku!
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

Re: ECP install from channel store

Mon May 14, 2012 6:30 pm

This works for me:
Sub RunUserInterface()
    screenFacade = CreateObject("roPosterScreen")
    screenFacade.showMessage("")
    screenFacade.show()
    port = CreateObject("roMessagePort")
    screenFacade.SetMessagePort(port)
    di = CreateObject("roDeviceInfo")
    ipaddrs = di.GetIPAddrs()
    if ipaddrs.eth0 <> invalid then ipaddr = ipaddrs.eth0
    if ipaddrs.eth1 <> invalid then ipaddr = ipaddrs.eth1
    print "ipaddr: ";ipaddr
    sleep(1000)

    url = "http://"+ipaddr+":8060/launch/11?contentID=12"
    xfer = CreateObject("roUrlTransfer")
    xfer.SetUrl(url)
    xfer.PostFromString("")

    while true
        msg = wait(0,port)
    end while
End Su

Note: without the "sleep", it doesn't work.

-JT

Who is online

Users browsing this forum: No registered users and 8 guests