PAUL SAXMAN: Hello everybody, my name is Paul Saxman.
Thanks for tuning in.
I'm a Senior Developer Advocate at Google, and today
I'm going to answer a few questions that we had on
Moderator about building Android apps for Google TV.
Next week we're going to be talking--
we have a track at Google I/O. We're going to be covering a
few different topics.
One is actually UI.
One is integrating media devices with Google TV.
And one is on the second screen I'll specifically be
giving the second screen talk.
So today, I'd like to cover a few of the questions that we
had on second screen applications.
But I'd also like to cover a few of the other general
questions that you had, because we had a few really
good ones via Google Moderator.
And we have some in Stack Overflow that we'll talk about
today as well.
On Google Moderator we had a really good question.
It actually ends up being a few questions
wrapped into one.
The question is, I want to send my Google, or Facebook ID
password, to Google TV for my Android phone.
How can I connect or sync between devices?
I'm saying that's kind of two questions in one.
Primarily because managing IDs and passwords is really one
separate topic beyond actually syncing data between devices.
So I'd like to cover that separately from
actually the syncing.
It's very fortuitous that there's a few questions about
syncing data between devices, because, like I said, that's
the talk I'm giving next week.
So I can maybe give you a little bit of a preview about
some of the content that I'm going to have.
So in terms of connecting or syncing between devices you
actually have a number of different options.
The main option is really do it yourself.
You can actually use the Java.net libraries which are
available on the Android framework.
These actually let you bring up a server
socket on Google TV.
You instantiate a socket on your Android phone, and you
actually can just do raw socket communication between
the two devices.
The easiest way to actually find the Google TV device, on
the home network, for example, is to use MDNS.
Google TV devices actually broadcast an MDNS service
called Anymote on the local network.
So if you use an MDNS library you can scan the network.
Find the IP address of the Google TV device in the living
room or in the user's home network.
Once you have the IP address, you can actually open up the
socket connection and do the communication yourself.
We've found, actually, that building up that type of
communication, like the socket communication, there's a lot
of stuff that's repeated or a lot of apps
that actually share.
So we're actually looking to put together a library that
developers can use to help automate some of that.
So your second option is to use a library that we'll be
discussing in a little more detail at Google I/O.
Your third option for sharing data between two devices, or
Google TV device and a handheld device, is actually
using the Anymote library.
The Anymote library is a little bit different from just
raw data communication though.
It's actually more of a remote control library that allows
handheld devices to send events, like key events and
mouse events, from a handheld device to the TV.
And the interesting thing about Anymote is that actually
the TV, or whatever app is in the foreground on the TV
actually, receives those events.
So you can actually use a handheld device as an input
device to send key and mouse events.
So that actually doesn't really fit into the question.
So what I'd say here is that for syncing data, just raw
data, either you're going to look at opening up socket
connections.
You can use the MDNS to discover the
devices on the network.
Or maybe wait a few days, or a week, and see what we have for
the library for sharing data.
In terms of actually IDs and passwords, and how you want to
manage IDs and passwords on devices, the short answer is
you probably don't.
You probably want to rely on something like the Android
Account Manager to manage your Google accounts.
Because when a user actually sets up an Android device they
enter their username and password.
And then those credentials are actually used to get access to
Google services.
I don't exactly remember the details, but it might be
possible to actually get some kind of authentication token
out from the Account Manager that you can
share with Google TV.
Or you can actually rely on Google TV itself to actually
have the credentials.
It also has the Account Manager so you can rely on
that as well.
Like any other Android device, the user actually enters their
credentials when they set up the device.
As far as Facebook is concerned, I'm not too
familiar with how their APIs work.
What I have seen on some applications is that it
actually opens up a web interface when the user
authenticates the Facebook service.
And I mean generally how this type of authentication works
is the application developer doesn't have access to the
credentials.
But they will have access to some kind of token that they
can use for authentication to the service.
So likewise, in that situation, if you do get a
token back from their APIs you can actually send it to the
Google TV device using raw socket connections.
Let's see, another question we have.
So this is actually a very popular question not only in
Moderator, but we get this question a lot about Anymote
and developing second screen apps and what
libraries are available.
Like I said, we're actually going to release more
libraries around Google I/O next week.
So stay tuned for that.
What we have right now, however, we have quite a few
libraries available.
We have the Anymote library, like I mentioned earlier.
That's a protocol for actually sending key events and mouse
events from a handheld device to Google TV.
And it actually is a very sophisticated library, because
it actually secures all the communication.
And the reason you want to do that, secure the
communication, is that if you are entering key codes in a
handheld device or using the handheld device as a keyboard
or using the key input, the user could be entering things
like passwords and login.
You don't want necessarily send that
clear text to the TV.
So the library actually secures the data interchange
so that it can't be sniffed on a local network.
So the Anymote protocol, the Anymote library, is actually
available in Java for Android devices or for Java
applications or Android applications.
We also very recently released the C++ version.
The C++ version we didn't provide these wrappers, but
could be used for iOS devices as well.
If you are building an iOS application, and you want that
to integrate with Google TV, you can look into that as an
option as well.
We also have the Android remote control for Google TV.
We open sourced that.
And so if you want to build a remote control application,
much like the Google TV remote for Android, you can actually
start there as well.
Also very recently, we released a library called the
Anymote library.
To be slightly differentiated from the Anymote Protocol
library that we released previously.
The Anymote library is actually an Android library
that you can import into an Android project and Eclipse,
and use it from there.
It actually simplifies the communication with Anymote.
Actually, the pairing, discovering, communication
with Anymote quite a bit.
So if you are thinking about building an application, you
might want to look into this Anymote library as well.
I've implemented an app using this library.
It's a matter of 100 to 200 lines of code.
If you implemented the Android remote control, or the Google
TV remote control for Android, if you take a look at that
code it's quite a bit more sophisticated.
There's a lot more code that was pushed up to the client
side there.
Whatever code we could abstract, and put in this
Android library, we did.
So those are a few of the options.
We're probably going to, like I said, talk about some more
stuff at Google I/O about second screen applications and
code that's available.
So my shameless pitch right now is that if you're really
curious about second screen applications, and building
them, be sure to check out our talk at I/O.
So I'm going to move on.
So we get a lot of questions about finding out what TV show
or movie, a Google TV user is watching.
Of course a lot of developers are really interested in this,
because then you can do things like tailored ads.
You can tie into social streams and actually
synchronize the viewing experience with a data feed or
a social stream.
Unfortunately, we don't support that
presently on Google TV.
The issue is, A, it's actually a secure video path.
We can't just expose the secure video path to
applications for them to analyze it themselves.
The other issue is that--
so even though the Google TV remote controls are universal
remotes, the user actually uses that to replace any other
remote that they have in their living room.
And the way that works is Google TV devices presently
have infrared blasters.
So when you configure your Google TV device you say what
other AV devices and set-top boxes you have
in your living room.
And then it can be configured to control those applications
through the Google TV remote control.
The issue is though-- so if a user uses the Google TV remote
control we know, essentially, what they've changed their
channel to.
However there's no guarantee that the user
used the remote control.
They could use their set-top box remote control.
They could use any other.
Go to the TV and change the channel directly.
There's a number of different things they can do.
We don't have that information necessarily.
So we don't presently have an API for actually exposing what
channel the user is currently watching.
But this is a pretty common request we get from
developers.
We are definitely investigating other ways that
we could potentially solve this problem.
Another very, very common question we get is about
embedding live TV in applications.
What a lot of developers want to do is, in addition to
actually synchronizing let's say information and live TV,
they want to put that in a single interface on the TV.
So, for example, you could be watching a sporting event and
maybe on the right hand side you can actually see live
statistics.
Embedding live TV in an application is something that
we currently don't support.
We absolutely get this request a lot.
We think it's a very, very valid use case.
And we are absolutely looking at ways to solve
that problem as well.
We don't have anything to announce in the very near
term, but, like I said, along with knowing what the user is
watching, embedding live TV is something that we're
definitely listening to developers on.
We have another question about Anymote.
This is from a developer that's very
familiar with Anymote.
And the question is, will Anymote support international
languages for upcoming
deployments in other countries?
We have made announcements that Google TV is actually
coming to other countries sometime this year.
Stay tuned on what countries and when.
So we are looking into actually adding that support
to Anymote right now.
We think we have a potential solution.
I'd say stay tuned on that.
It's something that we have a solution in hand.
It's just a matter of getting it in the hands of developers.
When and how unfortunately we can't say yet.
But that is something that we'd hopefully be able to
launch pretty soon.
I'm going to go over to Stack Overflow real quick.
I mean, I look at the questions in Stack Overflow
quite regularly.
And it looks like recently we got a lot of questions on the
Google TV Emulator.
This potentially is related to the fact that developers in
other countries are actually using the Emulator for
development--
more even domestically as well.
One question is, what are the possibilities of the Google TV
Emulator primarily around live TV?
So Google TV, and the Google TV Emulator, actually supports
the listing and channel changing APIs that the real
device supports.
But it doesn't, obviously, have access to actually real
live TV content.
So what will happen when you set up the Emulator, you enter
a US Postal code right now.
Once you give it the postal code, you actually can figure
what content provider you have or broadcast live TV provider.
And then actually the channel lineup will be populated in
the channel listing provider.
So when you create a channel listing provider you can get a
channel changing intent, and you can actually fire off that
intent to change the channel.
What happens on the Emulator, though, is that you're given a
test screen.
And it'll show you the call sign for the channel and it'll
show you the number.
So you obviously don't have access to actually the live
content, but we do emulate live content in the Emulator.
So one other question we have, this is actually a fairly
common question as well, about using Anymote in the Emulator.
We actually don't support Anymote
right now in the Emulator.
The issue is how we actually bridge the network between the
Emulator and the platform.
This is something else we're looking into.
Obviously I'm covering all the questions that we get a lot.
If I keep saying that we're looking into it, it's that
these are the questions that are in the top of our queue.
Let me see.
One other question here--
actually I'm going to say that's just about it.
We did have one more question in Moderator about Google TV
being updated to ICS and how long until Google TV is
updated to the next release.
This is something--
we don't necessarily announce future releases, but we are
definitely looking into actually updating it to a
future release.
Whether that's going to be ICS or the release after that we
cannot say.
But it is something that hopefully developers and users
can see in the not too distant future.
So I think that's just about it for the questions.
We started a little bit late, but I'm going to say that I
think I covered kind of the main questions that we had via
Moderator and Stack Overflow.
Again, so next week the Google TV I/O
sessions are on Thursday.
I think they're starting at 9:00 AM and
going through the morning.
We have one, Christian Kurzke is going to give a talk on
media devices.
Ossama Alami is going to give a talk on user experience.
And the talk that I'll be giving is going to be on
building second screen apps that integrate with Google TV.
Definitely hope to see you there.
If you have any questions, feel free to keep posting them
on Stack Overflow.
I'm guessing this moderator queue will be open for a
little while.
So I can definitely respond there as well.
And if you can make it to I/O, I'd definitely like to meet up
with you there.