Building Second Screen Apps for Google TV using Anymote

IPTV Restream that means you use my stream with your server and your customer use from your server. The total user can use your IPTV service depends on...

 

Hi there, I am Megha Joshi.

.

and welcome to this shorter screencast about developing 2nd screen apps for Google TV.

We will go over what are next display apps, how how they get the job done with Google Tv set and the way to put into practice them.

So what are next display apps? Next display screen purposes include interactivity concerning smartphones tablets or other gadgets and Google TV.

A second screen software runs over a remote unit similar to a smartphone or perhaps a pill.

It may be a controller for your Google Television application or it could insert far more operation to your Google Tv set software.

Most users who have a laptop, tablet or smartphone use their product though viewing Television.

So There's a large chance in the market for second monitor apps.

I will provide you with several samples of some next display screen apps for Google Tv set.

The YouTube remote app enables you to browse YouTube films on the Television set utilizing your telephone or pill.

It also provides much more information about the online video you happen to be viewing.

The Google Tv set remote apps is sort of a comprehensive-fledged controller to your Television in your mobile phone.

The source code of this application is open sourced to help you tweak it so as to add your very own customfeatures.

As an example, the developer of Capable Remote took the open up resource Google TV remote app and additional a few additional interestingfeatures like favorite channels.

The Peel Good Distant app – its a Television and films discovery app – it lets your search Television shows get far more information regarding the content material your are seeing as well as share it with your buddies on social websites.

MOVL they've got to a few apps including the Poker Pleasurable video game.

it is possible to Participate in poker with your buddies with your lounge.

It presents your individual encounter on your https://iptvrestream.net own handheld product and on Television you've got the shared practical experience which is the poker table.

So How can a distant application talk to Google Television? Among the choices is always to utilize the Anymote protocol.

Interaction involving the distant machine and Google Television set is established employing a a few step system.

The 1st step as to find Google TVs around the community community.

How Is that this accomplished? Google Television set sends mDNS broadcasts to the area community announcing data for instance its IP deal with and the port number of the Anymote service.

So.

.

to find Google Tv set units about the regional community the distant software follows these actions: Move 1 will be to probe the community network, then parse the responses it receives on the lookout for the string underscore anymote underscore tcp.

Extract the system identify, IP deal with and port quantity with the mDNS reaction.

Exhibit the list of all accessible units into the person and Allow the person pick a tool that he wishes to hook up with.

After the consumer selects a device, another move would be to authenticate to that Google TV device.

Authentication is done utilizing the Pairing provider and Pairing protocol.

The Pairing service uses a problem-reaction authentication ie.

it shows a secret code, the person enters this code as part of your application, your app sends this code back again to Google Television set, Pairing company verifies this code and if everything looks Alright it sends back again safety certificates in your application.

Now your application can use these certificates to talk to Anymote service jogging on Google Television.

The subsequent move is to send gatherings from a application to Google Television set using the Anymote protocol.

The Anymote protocol can deliver several sorts of enter gatherings similar to the key situations, mouse functions, and many others.

It can even be accustomed to fling Intents to Google Television.

One example is you can deliver in Intent tolaunch a movie from the YouTube app or to start your application or to see a webpage.

Now lets undergo a short tutorial on how to put into practice next monitor applications.

I are going to be utilizing the Anymote library because it makes it much easier to put into practice second monitor applications.

To down load the library, check out the Google Television set developers internet site, simply click 'Samples' then 'Look through code' and around the googletv-android-samples site simply click 'Checkout' and Adhere to the Guidance over the website page.

Now I've a BlackJack application for Google TV.

It's an easy single-player Variation.

I use the vital H over the keyboard to point Strike and S for Stand.

I would like a really simple BlackJack distant app on my cellular phone to send Strike or Stand to my Google Television BlackJack app.

Let us get rolling.

.

I have downloaded the Android SDK.

The following step is usually to download the Anymote library.

Then I will import it into Eclipse.

Now I'll make a new Android venture for my BlackJack remote app.

Now I'll insert the reference on the Anymote library.

Duplicate all of the declarations with the library in to the AndroidManifest for my app.

Now, I will put into practice the ClientListener interface from the library in the key Activity of my app.

Now lets make UI for the application.

The UI consists of 3 buttons: Strike, Stand and Start a brand new Game.

Allows declare all of the UI components.

We will bind into the AnymoteClientService.

The AnymoteClientService handles conversation with Google Television set.

While in the onServiceConnected callback We'll move an implementation of ClientListener blankets Regardless how normally you need and service to your attachClientListener means of the AnymoteClientService.

I will include an Intent to start the BlackJack app within the onConnected callback.

so the BlackJack application is going to be released on Google Television when the relationship is established.

Up coming We're going to setup the onClickListeners to the Hit, Stand and New Video game buttons.

The onClickListeners will be set up to send keyEvents through the AnymoteSender.

With the Strike button We are going to mail keyEvent H, to the Stand We are going to send keyEvent S and so on.

.

Allow us to see a quick demo in the application.

.

My network below blocks mDNS broadcasts so I will enter the IP handle of Google Tv set manually.

.

The pairing code is proven on Google Tv set.

I will enter this on my cellphone and as soon as the relationship is set up I can use my cellular phone as a controller for taking part in BlackJack on Google TV.