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...

 

Howdy, I'm Megha Joshi.

.

and welcome to this quick screencast about creating next screen apps for Google TV.

We are going to cover Exactly what are next monitor apps, how how they work with Google Television and the way to carry out them.

So what are next display apps? Second display screen programs require interactivity concerning smartphones tablets or other gadgets and Google Television.

A 2nd screen software runs on the remote machine just like a smartphone or perhaps a pill.

It could be a controller for the Google TV application or it could include a lot more features to your Google Television set application.

Most people who very own a notebook, pill or smartphone use their gadget while watching Tv set.

So You will find a huge chance in the market for second display screen apps.

I will give you some samples of some 2nd screen apps for Google Television set.

The YouTube distant app helps you to browse YouTube movies on your own Television set using your cell phone or pill.

It also presents additional specifics of the video clip you are looking at.

The Google Television remote apps is sort of a full-fledged controller for the Television set in your cellphone.

The source code of this software is open up sourced so that you can tweak it so as to add your own personal customfeatures.

One example is, the developer of Ready Remote took the open up source Google Tv set remote application and additional a couple of a lot more interestingfeatures like preferred channels.

The Peel Sensible Distant app – its a Tv set and films discovery application – it lets your look through Tv set exhibits get far more information about the written content your are seeing in addition to share it with your mates on social websites.

MOVL they have got to a couple apps including the Poker Entertaining game.

you are able to play poker with your pals as part of your front room.

It presents your individual encounter on the handheld machine and on Tv set you may have the shared practical experience which is the poker desk.

So So how exactly does a remote app talk to Google Tv set? Among the options would be to utilize the Anymote protocol.

Communication concerning the distant device and Google Television set is proven employing a three step course of action.

The first step as to find out Google TVs within the local network.

How Is that this finished? Google TV sends mDNS broadcasts to the nearby network asserting information including its IP address plus the port amount of the Anymote support.

So.

.

to find Google Tv set products around the area network the remote software follows these actions: Action 1 is always to probe the nearby community, then parse the responses it gets on the lookout for the string underscore anymote underscore tcp.

Extract the device identify, IP tackle and port number within the mDNS response.

Exhibit the list of all accessible equipment on the consumer and Permit the user find a device that he wishes to connect to.

When the consumer selects a device, another move should be to authenticate to that Google Tv set unit.

Authentication is finished using the Pairing company and Pairing protocol.

The Pairing support uses a obstacle-response authentication ie.

it displays a key code, the user enters this code inside your application, your application sends this code back to Google Television set, Pairing support verifies this code and when all the things appears to be ok it sends back stability certificates on your app.

Now your application can use these certificates to talk to Anymote company running on Google Television set.

The following step is usually to ship functions out of your application to Google Television utilizing the Anymote protocol.

The Anymote protocol can mail quite a few types of input situations similar to the vital occasions, mouse gatherings, and so forth.

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

Such as you could potentially ship in Intent tolaunch a video from the YouTube app or to start your software or to see a webpage.

Now allows go through a short tutorial on how to apply 2nd screen apps.

I might be using the Anymote library because it can make it much easier to implement second display screen applications.

To download the library, go to the Google TV developers web site, click on 'Samples' then 'Browse code' and within the googletv-android-samples site click on 'Checkout' and Adhere to the Directions about the web page.

Now I've a BlackJack app for Google Television set.

It is really a straightforward single-participant Edition.

I make use of the important H to the keyboard to point Hit and S for Stand.

I would like a extremely simple BlackJack distant application on my cellphone to send out Hit or Stand to my Google Television BlackJack application.

Let's start.

.

I've downloaded the Android SDK.

The next action is to down load the Anymote library.

Then I will import it into Eclipse.

Now I'll create a new Android project for my BlackJack remote application.

Now I will add the reference towards the Anymote library.

Duplicate all of the declarations through the library into your AndroidManifest for my app.

Now, I will carry out the ClientListener interface within the library in the principle Action of my app.

Now allows produce UI with the application.

The UI is made of 3 buttons: Hit, Stand and begin a whole new Activity.

Allows declare all the UI factors.

We'll bind into the AnymoteClientService.

The AnymoteClientService handles communication with Google Television.

Inside the onServiceConnected callback we will pass an implementation of ClientListener blankets Irrespective of how typically you would like and repair on the attachClientListener means of the AnymoteClientService.

I will insert an Intent to start https://iptvrestream.net the BlackJack app during the onConnected callback.

Hence the BlackJack app will be launched on Google Television set once the connection is established.

Future We'll setup the onClickListeners to the Hit, Stand and New Video game buttons.

The onClickListeners will be setup to ship keyEvents through the AnymoteSender.

For the Hit button We are going to ship keyEvent H, for your Stand we will send keyEvent S and so on.

.

Let us see a quick demo from the application.

.

My community in this article blocks mDNS broadcasts so I will enter the IP address of Google Television manually.

.

The pairing code is revealed on Google TV.

I will enter this on my phone and after the connection is set up I can use my mobile phone like a controller for playing BlackJack on Google TV.