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

 

Good day, I'm Megha Joshi.

.

and welcome to this small screencast about making next monitor programs for Google TV.

We will protect What exactly are second display screen applications, how how they operate with Google Television and how to put into practice them.

So Exactly what are 2nd monitor applications? 2nd display screen apps include interactivity concerning smartphones tablets or other equipment and Google Tv set.

A second monitor application operates with a remote system like a smartphone or even a pill.

It could be a controller for the Google Television set software or it could increase extra performance to some Google Tv set application.

Most end users who possess a notebook, pill or smartphone use their machine though observing TV.

So there is a substantial possibility in the marketplace for 2nd display applications.

I provides you with a couple of examples of some next display screen applications for Google TV.

The YouTube distant application allows you to look through YouTube films on your own Tv set utilizing your cellphone or tablet.

Additionally, it presents more details about the video you're looking at.

The Google Television set distant apps is like a entire-fledged controller to your Television on your mobile phone.

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

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

The Peel Sensible Remote app – its a Television and films discovery application – it lets your search Television reveals get more information regarding the written content your are seeing as well as share it with your folks on social media.

MOVL they may have to some apps including the Poker Entertaining recreation.

you'll be able to Perform poker with your folks as part of your family room.

It gives your individual knowledge on the handheld device and on Tv set you've got the shared encounter which can be the poker desk.

So So how exactly does a remote app talk to Google Television set? Considered one of the choices would be to make use of the Anymote protocol.

Conversation involving the distant unit and Google Tv set is established employing a a few stage system.

Step one as to discover Google TVs over the community network.

How is this accomplished? Google Television sends mDNS broadcasts on the regional network announcing information including its IP deal with and the port number of the Anymote support.

So.

.

to find Google Tv set products within the area network the remote application follows these actions: Stage one should be to probe the nearby network, then parse the responses it receives searching for the string underscore anymote underscore tcp.

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

Show the list of all readily available products for the user and Permit the consumer choose a tool that he wishes to connect to.

After the consumer selects a device, the subsequent stage is usually to authenticate to that Google Television device.

Authentication is done using the Pairing support and Pairing protocol.

The Pairing services utilizes a challenge-reaction authentication ie.

it shows a secret code, the consumer enters this code inside your app, your app sends this code back to Google Television, Pairing services verifies this code and when every thing looks ok it sends back again protection certificates to your app.

Now your application can use these certificates to communicate with Anymote assistance managing on Google Television set.

The subsequent phase would be to send situations from your application to Google Television set utilizing the Anymote protocol.

The Anymote protocol can ship numerous kinds of enter activities similar to the important activities, mouse events, and so on.

It may also be used to fling Intents to Google TV.

For example you may deliver in Intent tolaunch a movie inside the YouTube app or to launch your application or to see a webpage.

Now lets undergo a brief tutorial regarding how to implement second display apps.

I are going to be using the Anymote library since it makes it much easier to put into practice next monitor apps.

To obtain the library, stop by the Google Television developers internet site, click 'Samples' then 'Look through code' and about the googletv-android-samples web site https://iptvrestream.net simply click 'Checkout' and Adhere to the Guidelines to the website page.

Now I've a BlackJack app for Google TV.

It is really a straightforward one-participant Model.

I use the important H to the keyboard to indicate Strike and S for Stand.

I need a really easy BlackJack distant app on my cell phone to deliver Strike or Stand to my Google Television BlackJack application.

Let's get rolling.

.

I have downloaded the Android SDK.

Another step is usually to download the Anymote library.

Then I will import it into Eclipse.

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

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

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

Now, I will apply the ClientListener interface from your library in the primary Action of my app.

Now lets develop UI for that application.

The UI contains 3 buttons: Hit, Stand and begin a brand new Video game.

Allows declare many of the UI features.

We're going to bind to your AnymoteClientService.

The AnymoteClientService handles interaction with Google Television.

In the onServiceConnected callback we will pass an implementation of ClientListener blankets It doesn't matter how normally you would like and repair into the attachClientListener approach to the AnymoteClientService.

I'll insert an Intent to start the BlackJack application from the onConnected callback.

Hence the BlackJack app will likely be launched on Google TV as soon as the link is established.

Subsequent We are going to set up the onClickListeners for that Hit, Stand and New Activity buttons.

The onClickListeners will probably be set up to send out keyEvents throughout the AnymoteSender.

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

.

Let's see A fast demo in the application.

.

My community in this article blocks mDNS broadcasts so I'll enter the IP address of Google TV manually.

.

The pairing code is proven on Google Tv set.

I'll enter this on my cell phone and when the relationship is established I am able to use my cellphone to be a controller for playing BlackJack on Google Television set.