[MUSIC PLAYING]
CHET HAASE: Welcome to "Now in Android" episode number 37.
So first up, Android 12.
Another developer preview was launched--
DP2, as we affectionately refer to it.
This one has features such as picture-in-picture improvements
for the user, as well as the developer.
Also, a cool RenderEffect API that
makes it easier to achieve effects
like blur in the background and color filter effects.
So definitely check that out for the graphics geeks
among you, like me.
There is a blog that describes some
of the highlights of the overviews
of the features for users, as well as developers.
And certainly, check out the preview site
for all of the details on the behavior
changes, the API updates, stuff like that.
There is also a couple of things that we did in the docs
for the preview releases that are worth calling out.
First of all, a summary.
We know that dealing with some of the behavior changes
can be tricky for developers, but also important.
So we created a summary of what those changes are
to make it easier to figure out, just at a top level, what's
going on and how it's going to affect your app.
Also, foreground services are one of the behavior changes.
If your app is going to target this API and later,
then there are further constrictions-- constrictions?
Constraints on launching foreground services
from the background.
So there's documentation about what those constraints are,
as well as what some of the exceptional use cases are,
when that actually needs to happen.
So check out those docs.
Check out the preview, try it out on your app,
and send us feedback.
That is why we do these preview releases.
And it's pretty successful.
We need to get to the stable release,
so let's figure out the things that we need to fix on our way
there.
"MAD Skills" continues to roll along.
The WorkManager series is ending this week.
In fact, tomorrow, as I'm recording this,
we will have the final episode there.
So the episodes that are posted since the last "Now in Android"
include the episode from Caren Chang
on the deprecation of Firebase JobDispatcher
and GCMNetworkManager.
These libraries, these APIs are already deprecated,
and therefore, you need to migrate
to using WorkManager as the way to accomplish the task that you
used to use these libraries and APIs for.
So there are two guides available for migrating
from either one of those.
And Caren walks through what you need
to do, with a nice code example in the IDE showing
what you need to do in your application to migrate.
Also, there was a community tip from Hugo Visser--
shares how his team uses WorkManager
for downloading in the background, data
from the server, as well as processing that.
He also talks about how they discovered an issue with one
of the recent releases of WorkManager, filed an issue,
and hey, it got fixed.
That is why we post these things out there
and why we're so open about sharing what we're
doing with the early releases to make sure that we can actually
get feedback and fix those things on an ongoing basis.
So if you do see an issue, please file a feature,
file a bug, and we will get on that.
And then finally, the final episode, as I mentioned before,
is a livestream Q&A. We're going to have Ben and Caren, who
hosted the series in "MAD Skills,"
as well as Sumir Kataria and Rahul Ravikumar, who
are engineers on WorkManager from the beginning,
and they will be there to answer your questions.
Now, by the time you're watching the video,
pretty sure the video is coming out after the livestream ends.
However, we will post the livestream there
and you can see what questions and answers
we had during the show.
Android X-- ton of releases, as usual,
a bunch of releases that are stable now that are essentially
bug fix releases.
Fragment 1.3.2, Activity 1.2.2, and Lifecycle 2.3.1.
I hope you noted all of those numbers-- terribly important.
There were also a couple of interesting new libraries
that just hit their first alpha release
that I wanted to call out.
First of all, SlidingPaneLayout 1.2.0.
This one adds foldable device support.
So now, it can detect what's going on with the device
and actually put both of those panes
on the different screens of a foldable device,
when that's appropriate.
There's also new documentation on creating a two-pane layout
that was just released.
So check that out.
The App Startup library is now being
used by a couple of libraries, WorkManager 2.6.0 and Lifecycle
2.4.0.
This is interesting, because it is basically us
eating our own dog food, but using these facilities
that we've created to make it more efficient for you
in your application.
So I wrote a couple of articles about using Startup library
before, or the App Startup library, and why
you might want to do this.
There are a couple of reasons.
One is that it allows you to lazily load these things.
So you don't have to load everything and instantiate
everything at startup time, causing potential startup
delays when you don't need to.
Instead, you can lazily load these things
and instantiate them later when you actually
need to use that facility.
The other is that you can pool all of these things.
Instead of all of the tons of libraries
you're loading potentially having their own content
provider per library and having that overhead per library,
you have essentially one content provider for App Startup.
And then App Startup is in charge
of actually loading these other libraries as it goes.
Speaking of Lifecycle 2.4.0, this version also adds APIs
in the artifact-- it's lifecycle-runtime-ktx--
for collecting a Kotlin coroutine's flow from your UI.
This is timely, because Manuel Vivo just
posted a blog, which I was going to refer to later, that shows
a safer way to collect this flow from the UI
and then how to interact between this flow and your UI
to do it right.
Speaking of articles-- so first of all,
there's the one from Manuel, so certainly check that out.
Also, there's an article from Dan Galpin on Oboe.
So we talked about Oboe on one of the "ADB" podcasts
a year or so ago with the engineers
that had been working on it.
This is a native library that makes it easier
to achieve high performance and low-latency audio.
This library is now integrated into the Games SDK,
and Dan Galpin's article on the "Android Developer Blog"
goes into details on that.
Also, there's an article from Nicole Borrelli
on PendingIntents, and when and how you might want
to actually use those properly.
This is important, because there is
a change for apps that are going to be targeting Android 12.
If you're using PendingIntent, then you
need to declare the mutability of those PendingIntents.
So it's good to actually understand mutability
and how to use them properly.
This article would be a good place
to start figuring that out.
On the training front, we had a new unit come out
for the ongoing course, "Android Basics in Kotlin."
So this is a course for people that
are going to learn programming, as well as programming
in Android, as well as programming Kotlin
all at the same time in this course.
We had three units out there, and now we have four.
So unit 4 just came out.
This is specifically about doing internet, networking,
communication stuff.
So in particular, along the way, people
that tune into the course are going
to be learning how to use Kotlin coroutines--
more and more important.
But also, they're going to learn how
to use Retrofit and Coil for loading data over the network.
So common open-source libraries out there
that people are using for doing network transaction stuff.
And Coil-- again, we did a podcast episode
with the Coil author about dealing with images,
dealing with network images, bringing them
down over the network, and loading them
into your application.
So check out that unit to learn more
about all of those libraries and coroutines, as well.
And then finally, speaking of podcasts,
there was a major change internally
for the podcast, which shouldn't affect
anybody that's listening to it already,
which is we moved the site.
So if you typically go to the site
that we have on Blogger for checking out the show notes,
you will now go to a new site, which is on Libsyn.
It's adbackstage.libsyn.com.
That will have the show notes and the lovely pictures
that we take from our screen grabs when we have guests
and we remember to take the picture.
We also put it on a new feed.
But again, you shouldn't need to change anything.
If you are subscribed to the current feed,
we just delegate to the new feed.
And hopefully, it just works magically.
You shouldn't have to resubscribe.
In the meantime, we also added new episodes.
Romain and I talked to Chris Lacy,
who's a longtime Android independent app developer, who
has tons of apps out there.
We talked about some of those apps and how he developed them,
and how he used the Android framework, platform,
and library APIs to develop those,
and things that he's learned about Android along the way.
So super interesting.
It's also a good example of why we usually
record the podcast in a studio.
And then the studios went away last March,
and we're doing all this remote recording.
A bit more of a hassle, and the audio quality
certainly took a hit, because everybody's recording
in their own homes.
On the other hand, we get to call people in Australia
and do a podcast with them.
So it does open the door up to having lots of different topics
and lots of different people, so we're taking advantage
of that along the way.
As usual, all of the links to everything that I talked about
are in the article.
So check out the article for "Now in Android"
number 37 on Medium.
And if you like the video, go ahead and Like,
and share, and Subscribe to the Android Developers channel
on YouTube.
Thanks.
[MUSIC PLAYING]