[MUSIC PLAYING]
MAGNUS HYTTSTEN: Hello.
My name is Magnus Hyttsten, and I
work on the Developers Relation team here at Google.
I'm going to talk about the new, exciting API
that we are launching called the Google Drive Android API.
Here's where I plan to cover today.
First of all, what is the Google Drive Android API?
Then I'm going to talk about the features it
has before I dig into two very exciting ones, namely
the transparent offline syncing and the user interface
component.
And finally, I will talk about how the Google Drive Android
API relates to the Storage Access Framework
API released with KitKat.
So first of all, what is the Google Drive API?
It's a native Android API written in Java
to access Google Drive content.
At this time, you might ask, has this not been done before?
And the answer is yes, but not as a native Android API.
And this is very important, because we
have added a lot of features that
enables you to create shiny, first-class Google Drive
apps on Android even without breaking a sweat.
One feature that makes this API very useful
is that it incorporated into Google Play services,
a core part of the Android device, so to say.
And this has several important benefits.
First of all, this greatly reduces the app size,
which is perfect.
Since it enables the app to be downloaded faster,
it does not need to be updated as often.
And it makes the app have a smaller execution footprint.
For example, it will not take up as much memory, which is always
a great thing, of course.
But perhaps, an even more exciting aspect
of the Google Play Services integration
is that the API will be compatible
running on all devices starting with Gingerbread.
And this is no little benefit as that
will include 98% of the Android devices out there.
That means that you can rest assured
that this API can be used by everyone out there.
Just a tiny bit of devices out there may not use it.
But most of them will.
And that brings us over to the features of the API.
So pretty much everything you need
to do to create a great Google Drive app
is included in the API.
You can read, write, update files and folders,
traverse folder trees, view and update metadata.
There is a file picker user interface.
And you have transparent offline syncing.
So let's talk about that there's a transparent offline syncing,
to begin with.
As you're aware, an Android device is local storage,
but Google Drive storage resides in the cloud.
Now, one little peculiar thing about mobile devices
is that you can never trust network connectivity.
It changes network all the time, and it
is very often so that it has no network access at all.
This makes storing things in the cloud difficult.
But not with the Google Drive API,
because the Google Drive Android API,
we make sure that your app will never fail when it writes data.
And should communication with Google Drive not be possible,
the API will temporarily store data locally
and later sync that to Google Drive
once connectivity has been reestablished.
For you as an Android developer, this is, of course, great,
because it takes all the error management
resulting from network problems off your mind.
Another great feature of the Google Drive Android API
is the user interface component.
And in the first release of the API,
there is a folder and file navigation and selector.
This makes it really easy to write an application where
the user needs to select folders or files.
The only thing you need to do is display this file picker.
So how do you do that?
Well, first of all, you create an intent,
which opens up the file activity builder.
Then the actual magic happens when the intent is fired.
The user will be able to select the files or folders that they
want.
Once the user has selected their files,
the result will be available in the onActivityResult method,
as usual on Android.
And finally, you get the Drive ID for the content
that you can work with.
Finally, I would like to say some words on the KitKat
Storage API and how it relates to the Google Drive Android
API.
Well, although both can access and store information
on Google Drive, there are some fundamental design differences.
The first one is that Google Drive Android API only
works with Google Drive.
This allows Google to add things to this API which
are specific to Google Drive.
On the other hand, the Storage Access Framework
is a generic API.
And this enables it to work with multiple different back-end
storage technologies, not only Google Drive,
using a single interface.
And here is a big difference.
If you plan to do a very tight and nice integration
to work Google Drive for your app,
then Google Drive Android API is perfect.
Another feature of Google Drive is
that the developer can safely assume
that the user has already signed into Google Drive.
The Storage Access Framework is excellent
if your app needs to access multiple storage
technologies and not just Drive.
And of course, having said all of this,
there is nothing stopping you from using
both at the same time, of course-- All Google
Drive-specific features as well as a generic integration
with other storage technologies.
You should also be aware that the Store Access Framework will
only work on devices that are ground in KitKat.
And that's what I wanted to present to you today.
We are very excited to launch the Google Drive Android
API and the feature it contains.
Now go out there and create great apps
using this Android and Drive API.
And don't forget to tell us all about it.