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, I am Megha Joshi.

.

and welcome to this brief screencast about constructing 2nd display applications for Google Television.

We're going to cover What exactly are next display apps, how how they operate with Google TV and how to put into practice them.

So What exactly are second display applications? Next display purposes require interactivity between smartphones tablets or other products and Google Television.

A next display screen software runs on the distant device like a smartphone or perhaps a pill.

It may be a controller for your Google TV application or it could increase much more performance to your Google Television set software.

Most buyers who individual a laptop, pill or smartphone use their machine while looking at Television.

So You will find there's big option in the market for 2nd monitor applications.

I provides you with several samples of some second monitor apps for Google Television set.

The YouTube remote app helps you to search YouTube movies in your Television set using your mobile phone or pill.

Additionally, it presents far more information about the movie you are viewing.

The Google TV distant applications is like a total-fledged controller in your Television in https://iptvrestream.net your telephone.

The supply code of this software is open up sourced in order to tweak it to add your personal customfeatures.

Such as, the developer of Capable Distant took the open up supply Google Television set distant app and extra a couple of extra interestingfeatures like most loved channels.

The Peel Sensible Remote application – its a Television set and flicks discovery app – it allows your browse Tv set demonstrates get extra details about the articles your are watching in addition to share it with your folks on social networking.

MOVL they've got to a couple programs including the Poker Exciting match.

it is possible to Enjoy poker with your pals in the lounge.

It gives your own knowledge in your handheld product and on Television you may have the shared working experience which can be the poker desk.

So How can a remote application talk to Google Tv set? Certainly one of the choices is always to use the Anymote protocol.

Conversation concerning the distant machine and Google TV is set up employing a 3 move course of action.

Step one as to discover Google TVs on the neighborhood community.

How is this carried out? Google TV sends mDNS broadcasts about the community network saying information for example its IP handle as well as port variety of the Anymote provider.

So.

.

to find Google TV gadgets over the nearby network the distant application follows these measures: Phase 1 should be to probe the local community, then parse the responses it gets looking for the string underscore anymote underscore tcp.

Extract the gadget name, IP deal with and port number from the mDNS reaction.

Display the list of all available equipment into the person and Enable the user find a device that he wishes to connect to.

Once the person selects a tool, the following step should be to authenticate to that Google Television set device.

Authentication is finished utilizing the Pairing provider and Pairing protocol.

The Pairing assistance employs a problem-response authentication ie.

it shows a magic formula code, the person enters this code with your app, your app sends this code back again to Google Television set, Pairing company verifies this code and when every little thing looks Okay it sends back again safety certificates to the app.

Now your app can use these certificates to talk to Anymote provider running on Google Tv set.

Another stage is usually to deliver situations from your app to Google Tv set using the Anymote protocol.

The Anymote protocol can send a lot of forms of enter gatherings just like the critical functions, mouse gatherings, and so forth.

It will also be accustomed to fling Intents to Google Tv set.

By way of example you could possibly deliver in Intent tolaunch a movie inside the YouTube app or to launch your software or to watch a webpage.

Now allows undergo a short tutorial regarding how to put into action second screen apps.

I is going to be utilizing the Anymote library since it causes it to be easier to employ next display screen apps.

To download the library, pay a visit to the Google Television developers site, click 'Samples' then 'Look through code' and around the googletv-android-samples internet site simply click 'Checkout' and Adhere to the Guidelines to the page.

Now I have a BlackJack application for Google Television.

It can be a simple solitary-player Variation.

I utilize the crucial H around the keyboard to point Hit and S for Stand.

I would like a extremely straightforward BlackJack remote app on my cell phone to mail Strike or Stand to my Google TV BlackJack app.

Let us get rolling.

.

I have downloaded the Android SDK.

The following stage will be to download the Anymote library.

Then I will import it into Eclipse.

Now I will make a new Android undertaking for my BlackJack remote application.

Now I'll increase the reference to your Anymote library.

Copy all the declarations from your library into your AndroidManifest for my app.

Now, I'll implement the ClientListener interface from the library in the principle Activity of my app.

Now allows develop UI for that application.

The UI consists of three buttons: Hit, Stand and begin a completely new Sport.

Allows declare all the UI elements.

We'll bind to the AnymoteClientService.

The AnymoteClientService handles communication with Google TV.

During the onServiceConnected callback We'll pass an implementation of ClientListener blankets It doesn't matter how frequently you desire and repair to your attachClientListener way of the AnymoteClientService.

I will add an Intent to start the BlackJack application in the onConnected callback.

And so the BlackJack application is going to be introduced on Google Television set the moment the connection is set up.

Future We'll set up the onClickListeners with the Strike, Stand and New Sport buttons.

The onClickListeners will be setup to deliver keyEvents in the AnymoteSender.

For that Hit button we will deliver keyEvent H, for your Stand We'll ship keyEvent S and the like.

.

Let us see A fast demo on the application.

.

My network right here blocks mDNS broadcasts so I will enter the IP address of Google TV manually.

.

The pairing code is shown on Google Television.

I will enter this on my telephone and as soon as the connection is proven I'm able to use my mobile phone to be a controller for playing BlackJack on Google TV.