Developing Second Screen Apps for Google TV part iii

While we extensively covered how to develop Android apps for Google TV in the second part of this blog series, this third and final post will discuss second screen apps for Google TV and how they can add more functionality to existing Google TV apps.

The following images will clearly reflect how today’s user is interacting with Google TV using Android devices. The user can use their Android devices as remote controls and to access functionalities of Google TV applications. This concept is called second screen technology, a smart solution gaining popularity in the Smart TV world. By second screen, we mean an additional electronic device that allows a user to interact with content that they are consuming on their television.

Google TV applications
The apps provide additional content, engage social streams and provide new mediums for advertising and merchandising. The major objective is to make users active participants in a live TV setup and to enhance the User Experience.

Use Cases

  1. Synchronization of content being viewed on mobile device.
  2. Broadcasting live comments over content.
  3. Using mobile device as game controller to play games on television.
  4. Sending live stats, votes for a chat show
  5. Apps that can extend the existing content on television.

Example of Real Apps

  • YouTube Remote application: The YouTube remote application is an intuitive addition to your Google TV experience. By using this app you can activate your Android smartphone or tablet device as a remote and control YouTube videos on desktop and/or Internet TV.
  • Google TV Remote application: Equipped with voice search functionality, you can use the Google TV remote application to share videos and web pages with the TV and even use your voice to search for content.

Communication Workflow

Communication Workflow
The remote application on mobile devices communicates with Google TV in three phases:

Discovery Phase

When Google TV starts, the Anymote service starts sending mDNS broadcast. The broadcast contains the IP address and port number of the remote device. On parsing the response, we get the GoogleTV device name, IP address and port number. The library displays a list of available Google devices extracted from response to the user.

Authentication Phase

The pairing service which runs in parallel authenticates remote devices and establishes a pairing session. The identity is established using the pairing protocol. In the pairing process, the client contacts the server, and the server issues an alphanumeric code for the user to enter on the client device’s keyboard.

Proper challenges can be established when the client sends the challenge to the server. The server in turn receives the challenge, creates it and turns it back to the client to respond.

If pairing succeeds, it sends a certificate to the remote application. The certificate should be stored for subsequent connection attempts with Anymote service.

Sending Events to Google TV

The Anymote protocol sends a request message containing event request like keyevents, mouse events. The Anymote Service responds with a ResponseMessage. All Google TV devices implement the Anymote service, which can receive and respond to Anymote protocol messages.

It requires remote devices i.e smartphones or tablets to connect using TLS/SSL, which protects user keystrokes from being recorded by apps or devices sniffing on the same local network. The encryption prevents the leakage of secret information such as usernames, passwords, etc.

The Anymote messages are in protocol buffers format, a platform-independent mechanism for serializing structured data. The protocol make client apps as customized controllers for Google TV apps and can also help you to extend the functionality of existing apps.

Sending Intents to Google TV

A Google TV application like YouTube is launched using the anymote service received from a remote application.

final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("vnd.youtube://<video_id>");
anymoteSender.sendUrl (intent.toUri(Intent.URI_INTENT_SCHEME));

Conclusion

We believe that second screen apps will play a huge role in the future of television. In addition, they are more accessible and can be used by anyone with ease. It acts as an additional viewport for the user and can engage users with social feeds of information. Two real-life examples of this would be Twitter and Facebook feeds coming from your friends and any discussion forums on a particular subject.

This final post concludes my effort to share experiences on Google TV application development world from a developer’s perspective. If you liked this 3-part series or have any questions or feedback for me, I will be happy to reply to these. Please leave your comments below.

Vineet Aggarwal

Vineet Aggarwal

Sr. Technical Lead

Vineet Aggarwal is a Sr. Technical Lead at 3Pillar Global Labs, which is part of 3Pillar’s company strategy in the fields of big data analytics, mobility, and cloud-based applications. Vineet leads development and support for the popular open source tool SocialAuth–Android. He also leads our Android Competency Center in India and is responsible for mentoring Android Developers across the company to develop internal expertise. He has hands-on experience with various mobile platforms and keen interest in Android and iPhone. He loves designing new apps, learning upcoming technologies, and mentoring members of the Android community.

One Response to “Developing Second Screen Apps for Google TV part iii”
  1. Rajesh on

    Hi Vineet,

    Can you advise which is the best GUI to develop TV displayable applications

    Reply
Leave a Reply

Related Posts

3 Topics We Should Be Talking About at BrainstormTech Our 3Pillar clients, regardless of industry, share one common trait - they need help strategizing, designing, and delivering revenue-generating digita...
4 Reasons Everyone is Wrong About Blockchain: Your Guide to ... You know a technology has officially jumped the shark when iced tea companies decide they want in on the action. In case you missed that one, Long Isl...
3 Cloud Optimization Projects That Will Pay for Themselves i... AWS introduced 1,430 new features and tools in 2017, including 497 in the 4th quarter alone. This means that it can be a challenge for even the mos...
The Connection Between Innovation & Story On this episode of The Innovation Engine, we'll be looking at the connection between story and innovation. Among the topics we'll cover are why story ...
Go Native (App) or Go Home, and Other Key Takeaways from App... I just returned from my first WWDC. I feel like I learned more in a week at Apple’s annual developer’s conference than I have in years of actually dev...