TIMOTHY JORDAN: OK.
So we're now in the Android Sandbox area.
I'm going to spend some time in this area
because there's a lot going on.
But we're going to start with just features of the OS.
And David here is going to tell us about a couple
of things I've been really curious about.
Can we start with Kotlin?
Let's talk about Kotlin.
DAVID: Sure.
Kotlin is definitely the show-stealer,
it seems to me from watching the keynotes.
So Android Studio now has Kotlin support.
You can create a new project.
And you'll see that you have the ability
to check Kotlin support in from the beginning.
We already have a Kotlin app here,
but you can also write Java code and convert
it to Kotlin very simply.
TIMOTHY JORDAN: And do you like writing Kotlin?
DAVID: I love writing Kotlin.
I actually haven't gotten a chance
to write Kotlin recently.
But when it was--
when I was first learning about it a year ago,
I spent a lot of time just going through the language
and getting very excited about it,
just because it looked so much more concise,
and it brings in a lot of modern features
that I like from a lot of other languages.
And I was really happy to see how fast they moved on it,
and the great tooling support that IntelliJ
brought into it as well.
TIMOTHY JORDAN: Yeah.
I mean, I've been talking to people around the festival
today, and one of the things they keep saying
is how well-designed they believe Kotlin is
and what a mature language it is because of that.
DAVID: Yeah, no, it's absolutely.
I feel that they've got a lot of influences
from a lot of new languages.
I highly recommend trying it out, give it a shot.
TIMOTHY JORDAN: And Katherine, you've
been working on bringing Kotlin into Android
for a little while.
Can you tell us what the motivation for that was?
KATHERINE: Yeah.
So I think the big reasons we want to bring Kotlin to Android
were that, like David says, most developers who
try it find it to be really concise and expressive,
and has a lot of awesome features like type
and null safety, which are really useful for writing
stable, non-crashy apps.
Plus it's totally compatible with the existing Android
environment, and also with the Java language,
which means that, even if you have a large existing Android
code base, it's really easy to incrementally adopt it.
And you can kind of try things where it works.
You don't have to go rewriting large swaths of the code.
TIMOTHY JORDAN: That's awesome, being
able to incrementally adopt it, as you were saying,
so you don't have to sort of jump in and refactor everything
all at once.
KATHERINE: Yeah, exactly.
Like, if you have some chunk of Java you're happy with,
you can just leave that, keep modifying it,
write some new module in Kotlin.
You kind of adopt it very organically as you see fit.
TIMOTHY JORDAN: Awesome.
KATHERINE: Oh, and I think the final thing is
just we've been hearing about it from more and more developers,
that they love it, it really makes
them happy to write in it.
And yeah, we try to listen to our developers
and give them things they love, so hey.
TIMOTHY JORDAN: Absolutely.
I want to look at something else as well, David--
the profiler in Android Studio.
Can you show me something there?
DAVID: Sure.
We're really excited about the profilers.
I feel like this is a long time coming.
If you look here, you can actually
see that this is displaying Bitmaps.
It's a sample Android app.
We downloaded it as is.
We didn't modify it at all.
And if you look over here, you can actually
see we've already started the profilers on it.
We have the CPU, memory, and network profiler.
So if I start to interact with the app,
you'll start to see the different profilers
[INAUDIBLE].
TIMOTHY JORDAN: Oh, wow.
DAVID: Yeah.
So you can deep dive into any of them.
You can sample CPU activity here.
We can click on some stuff.
And then what you'll see is, if you drag across there,
you could actually look at the content of the request.
This is actually an HTTPS request,
and you can still see the contents of it,
which is something that we're very excited about,
because that was normally a challenge for a lot of people
to try to do.
I think some people would debug in HTTP traffic
in order to see it.
And so we've sort of enabled some new features here,
which we're happy about.
TIMOTHY JORDAN: Oh, yeah.
I'm used to inspecting the traffic on the machine
that I'm testing on to try and get that debug information.
And yet, here it is right in Studio.
That's so convenient.
DAVID: Yeah.
I really hope that people have a chance to play with it.
We hope that they find the profilers intuitive.
I mean, to me, what's exciting is,
as you're messing around with your app, you might--
all of these things that were invisible for you,
you now have a chance to actually play around with it
and see it.
And as I said, we don't even think
we're including documentation with it.
But we're even hoping that, even without it,
you should just be able to play around and try things
out and see what happens, and then learn
more about your code.
We were once debugging some code.
And we're like, no, something's wrong here.
We're getting this weird memory spike.
And we were actually-- we were surprised to find
that, all along, this code had a problem with it,
but we didn't know about it until we
had written our own profilers.
TIMOTHY JORDAN: That's profiling.
DAVID: There you go.
TIMOTHY JORDAN: Awesome.
David, thanks so much for taking the time.
DAVID: Thank you very much.
A few people online have been asking
me to get a demo of picture-in-picture.
So I found Rob, and he's going to give that to us.
ROB: Hey, I'm Rob from the Android Window Manager team.
And I've been working on picture-in-picture
for this release.
We're really excited about it because Android--
you know, it's always been a good platform
for interacting with content, watching YouTube, et cetera.
But if you want to start to interact more deeply
and multitask, we haven't always provided the tools.
And I think picture-in-picture is a great one.
So I'll walk you through a way of using it.
So here we have this video.
And it's a Go game by Lee Sedol, the player who famously
challenged AlphaGo last year.
And we can see, if we go back to Home, we'll get the video.
And it's still playing here.
We can move it around.
And for example, I could go into my Go app,
and I could start to multitask.
And I could play the game along--
TIMOTHY JORDAN: Oh, that's so cool.
ROB: --so that I could, you know, play along with the game
and begin to explore my own variations.
And I can dismiss, tap when I'm done.
TIMOTHY JORDAN: That's awesome.
ROB: That's the Android picture-in-picture.
TIMOTHY JORDAN: Thanks, Rob.
ROB: Well, thank you.
TIMOTHY JORDAN: Everybody's talking about Kotlin,
so I was able to get some more info out of Andre
from JetBrains.
Hi, Andre.
ANDRE: Hello.
TIMOTHY JORDAN: So first question.
You've been working with the Android team for a while.
What are you most excited about with this collaboration?
ANDRE: Well, this is very great to be here because, basically,
this means that very many people will be coming to Kotlin,
new users, new-- well, new, exciting ways
of using the language, new learning materials,
new libraries, everything.
So it's-- basically, Kotlin's growing as we are looking
at it.
And it's altogether wonderful.
I'm very grateful to the Android team
that they had the courage to make the move.
That was-- as they say, that was what the public was actually
wanting them to do.
So we're very happy about it.
TIMOTHY JORDAN: All right.
So let's talk a little bit about the future
and what's coming next.
First, the language.
What's coming next with the Kotlin language?
ANDRE: There are actually many things we're working on.
So the brand new thing with Kotlin is coroutines.
We have shown the experimental design pretty--
yeah, it was, like, three three months ago.
So coroutines are a big thing now,
doing asynchronous programming in an easy way.
So we're now looking into improving that and finalizing
the design, so that the next version of Kotlin
will probably have it already stable so everybody
can use it and be sure it will work for all the versions.
Then the next big thing is multiplatform Kotlin.
So Kotlin's now big on Android, big on the server side.
We are working on JavaScript.
And we have recently introduced native,
which is in a technical preview version now.
So we're trying to span the language across many platforms
and enable multiplatform development, where
we can, say, have a couple of modules reused
for many platforms, and then some platform-specific modules
implementing some functionality in a specific way that's
leveraging the intricacies of the platform.
So it's a very big big direction for us.
And then there are language-only things
like value types, for example, for optimal storage
or collection literals.
So we have very many directions there.
And the strategic ones are those,
you know, platform things and the coroutines.
TIMOTHY JORDAN: Awesome.
What about tooling?
What's next there?
ANDRE: Yeah.
So we're-- actually, JetBrains is all about tooling.
So our first and foremost goal with Kotlin
was making the language toolable.
And now we're in a pretty good shape with many things,
but there's a long road ahead.
We're now tightly integrated with Android Studio,
and we'll work more on that.
So in 3.0 preview, we have new wizards for creating things.
And we have unified analysis for Java and Kotlin,
and we'll improve that.
We're working on the incrementality
of the toolchain.
So Google side as well as JetBrains side.
And for non-Android things, we're
doing pretty much the same.
We're basically getting on par with Java on the Java platform.
We're working on debugability and incrementality
for JavaScript.
Native is very young for that, but we'll get all that there,
too.
TIMOTHY JORDAN: Awesome.
Thank you so much.
ANDRE: Thank you very much.