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

 

Hello there, I am Megha Joshi.

.

and welcome to this short screencast about creating 2nd screen purposes for Google Television.

We will cover Exactly what are 2nd screen applications, how how they get the job done with Google TV and how to put into action them.

So what are second screen applications? Next display screen applications involve interactivity among smartphones tablets or other devices and Google Tv set.

A 2nd monitor software runs on a remote product like a smartphone or simply a pill.

It could be a controller for the Google TV software or it could add a lot more features to a Google Tv set application.

Most buyers who very own a laptop computer, pill or smartphone use their machine whilst watching Television.

So There exists a massive possibility in the marketplace for next monitor applications.

I will provide you with a couple of samples of some next display screen apps for Google Television set.

The YouTube remote application lets you look through YouTube videos on the Television set using your mobile phone or tablet.

In addition it presents additional specifics of the video you're observing.

The Google TV distant apps is sort of a whole-fledged controller to your Television on your own telephone.

The resource code of the application is open up sourced so you can tweak it so as to add your own customfeatures.

For example, the developer of Able Distant took the open source Google TV remote application and extra a number of a lot more interestingfeatures like beloved channels.

The Peel Good Remote application – its a TV and movies discovery app – it allows your search Tv set exhibits get a lot more details about the information your are watching and likewise share it with your folks on social media marketing.

MOVL they have got to a few purposes including the Poker Pleasurable match.

you could Perform poker with your buddies inside your family room.

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

So how does a remote app communicate with Google Tv set? Amongst the choices is usually to make use of the Anymote protocol.

Communication among the remote product and Google Tv set is proven utilizing a a few step approach.

The first step as to find out Google TVs around the nearby community.

How Is that this accomplished? Google TV sends mDNS broadcasts around the neighborhood network announcing facts which include its IP address along with the port number of the Anymote support.

So.

.

to find out Google TV products around the community network the distant software follows these techniques: Stage 1 will be to probe the neighborhood community, then parse the responses it gets seeking the string underscore anymote underscore tcp.

Extract the gadget identify, IP handle and port range from your mDNS response.

Display the listing of all accessible devices on the user and Permit the user pick a device that he needs to connect to.

As soon as the user selects a tool, the subsequent stage would be to authenticate to that Google Television unit.

Authentication is done using the Pairing assistance and Pairing protocol.

The Pairing provider takes advantage of a challenge-reaction authentication ie.

it displays a mystery code, the consumer enters this code as part of your app, your app sends this code back to Google TV, Pairing service verifies this code and when almost everything seems to be Alright it sends again safety certificates on your app.

Now your app can use these certificates to communicate with Anymote service managing on Google Tv set.

The subsequent phase is usually to ship situations out of your application to Google Television set utilizing the Anymote protocol.

The Anymote protocol can send several varieties of input functions such as important occasions, mouse situations, and many others.

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

One example is you might ship in Intent tolaunch a movie while in the YouTube application or to start your application or to look at a webpage.

Now lets go through a brief tutorial on how to implement second monitor apps.

I are going to be using the Anymote library because it makes it simpler to apply 2nd display applications.

To down load the library, stop by the Google TV developers web site, simply click 'Samples' then 'Look through code' and over the googletv-android-samples web-site simply click https://iptvrestream.net 'Checkout' and follow the Guidelines over the web page.

Now I have a BlackJack application for Google Television.

It's an easy one-participant Variation.

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

I would like a very easy BlackJack remote application on my phone to send out Strike or Stand to my Google Tv set BlackJack app.

Let's get rolling.

.

I have downloaded the Android SDK.

The subsequent step would be to download the Anymote library.

Then I'll import it into Eclipse.

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

Now I'll add the reference to the Anymote library.

Copy all of the declarations within the library into your AndroidManifest for my application.

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

Now lets create UI for your app.

The UI is made up of 3 buttons: Hit, Stand and Start a fresh Game.

Lets declare every one of the UI things.

We're going to bind to your AnymoteClientService.

The AnymoteClientService handles communication with Google Tv set.

Inside the onServiceConnected callback We are going to go an implementation of ClientListener blankets Regardless of how usually you wish and repair on the attachClientListener technique of the AnymoteClientService.

I'll insert an Intent to start the BlackJack app in the onConnected callback.

Therefore the BlackJack app might be released on Google Tv set the moment the relationship is recognized.

Subsequent We'll set up the onClickListeners for that Strike, Stand and New Sport buttons.

The onClickListeners might be setup to send keyEvents from the AnymoteSender.

For your Hit button We're going to ship keyEvent H, with the Stand we will send keyEvent S and so forth.

.

Let's see A fast demo with the application.

.

My community right here blocks mDNS broadcasts so I will enter the IP handle of Google Television set manually.

.

The pairing code is shown on Google Television set.

I'll enter this on my telephone and as soon as the relationship is recognized I'm able to use my cellphone being a controller for enjoying BlackJack on Google Television set.