What's new in Android 11 - Chet Haase and Romain Guy. Fireside Chat with Chet Haase, Romain Guy, Yigit Boyar and Murat Yener. Adapting Your Apps for Android 11 Privacy Changes - Joe Birch.
Hello everyone welcome to a third online Meetup this is a very special meter for us we have people from Google's Android team joining us and we?
Have sessions around Android 11 as well as a live Q&A sessions for everyone? To answer their questions so we also had chat and romain to this stream. And they're going to talk about what's new in Android 1101 requests for.
You if you have any questions regarding? Android 11 or Android in general please. Start putting them in YouTube comments so that we can have them answered in the Q&A section which will be followed by this session so yeah just let me:
Exact hi-tech hi yeah please introduce Oh how about if I introduce me I'm better in introducing! Me anyone else hi I'm Chet I'm Chet Haase from the Android developer relations team!
Thanks for coming to the event and thanks for having us here yeah Thank You Jay hi Roman hi I'm all not from.
The Android toolkit team thanks for having us it's really weird it feels like this are we sure there are people watching this. Yeah so basically just talking to chance really good so we'll get started with your session let me just read? Your slides okay I'm gonna remove myself!
From stream and then over to you guys all right so welcome to what's new in Android I think we already: Introduced ourselves so we can probably just.
Go to the next slide first of all I did want to point out that the last time I gave a talk in Bangalore it? Took me like 97 days to get there and. I was incredibly jet-lagged and so now we're doing this late in the evening our time so that I feel exactly.
The same completely out of time here so I've always wanted to go to India I guess. I finally did yes there's no good took not quite as long to get there this time so the question?
Is what is new first of all what's! New about this normally we give this talk once a year at Google i/o it's usually okoma it's usually me and it's usually. Dan Sandler who is not going to join us tonight because it's even later in Cambridge where he lives I I didn't.
Actually it was it was a secret don't tell him but otherwise. The talk is essentially the same as it has been since what 2011 the first. Time we gave a talk like this which means we are going to talk about?
The platform we're going to talk about the larger changes that happened. In Android 11 are still happening in Android 11 since we're now in the beta period of that release.
We'll also talk a little bit about Android studio and see what's happening. In the tool space and we'll also talk about some of the unbundled.
Libraries and api's that we offer outside of the platform so yeah what you think about this talki. It's the talk where Chetan will not try to explain things they do not understand no no you're not supposed to give that secret. Away no no we we know all the stuff cold absolutely I wrote these slides I must know it right let's start with.
UI my favorite area probably your favorite area as well MoMA and and everybody else is as well so first of all let's talk about. Window in sets this is a very old API that has a lot of functionality that.
Didn't really make sense it was difficult to deal with it gives you information about the in sets that are available. The constraints that are on the screen but it does not give you the information you actually want to know which!
Is what is the window that has those in sets and by gosh where? Is that ime keyboard anyway so we have changed the API quite! Substantially in Android 11 we've deprecated almost all of the old methods that were there all the ones that didn't.
Really tell you all the information that you wanted and instead we introduced a lot of new API to this class that does give you? That information so now you can ask for in sets information that is specific to the windows on the screen that you really.
Care about so things like where is the status bar and how big is the navigation bar and where is that. IME after all so the way that it works here's a little bit of sample code you set this window in sets listener inside. That you can get the window insights object and then you can actually see.
If the IME keyboard is visible who knew that this was so difficult that's right everybody. Did you took us only 12 years to do to point at the CP I this is this is like:
Two new methods so far so yeah it took a while yeah people. Have been asking for this kind of functionality for a while and and now it's here so also you can once you. Know that the keyboard is visible you can actually get information about the insights.
You can find out where it is and how big it is so the question. Is why did we do this now in sets has been there for a while well the answer. Is at least partially to enable IME animations my personal favorite feature in the:
Release so finally you can synchronize the content in your application with the motion.
Of the keyboard so previously the keyboard would animate. In it was a nice smooth animation.
But you couldn't smoothly animate your content because you didn't know when the keyboard was coming you would just get a message. That told you the new size that everything was and then you had to react to it so your. Application is snapping while the keyboard is animating and not a great.
User experience so now you can actually synchronize you can get information about the keyboard and you can even control that keyboard. Animation so let's look at a little bit of a sample so these? Illustrations come from a sample I'll put up a URL later Chris Bane's we're at the sample to show how to do some of the stuff there's two.
Versions of the control of the keyboard going on here? The one on the left the keyboard.
Is doing sort of the default motion which is it is snapping. Into place it is animating in so you know you tap on the edit text and it automatically.
Animates in at whatever it's normal animation rate is and the application. Can get that information and animate its content.
Appropriately so it is reacting to the keyboard changes and changing.
Itself to synchronize with the motion of the keyboard on the right. It's even more interesting the the user is actually dragging the information dragging? The content in the application and then the application is controlling frame by frame the animation.
Of the keyboard itself because it has full control over this so we'll take a look at a little. Bit of sample code to show how that works so this is the animation that was on the left there the keyboard automatically animates in and the application.
Listens in to see what's going on so you set a listener this callback object there and then you can basically listen to the motion.
Lifecycle to figure out where that keyboard. Is and what you can do about it in your application content on the other side on the right-hand?
Side of that sample we saw the.
User driving it with its gesture as they are scrolling the content the keyboard smoothly. Scrolls in so you can set up an animation.
You can drive it to be set and forget! But in this case we actually wanted to drive it to be gesture driven reacting to the user input. Instead so we say well we're animating the keyboard here.
It's going to be infinite duration we don't know how long the animation is going to run because we're just driving it as the user is pulling? The content up and down letting our interpolation for the same reason where's it going to be going frame by frame anyway. You can have a cancellation signal in case you need to kill it in the middle and then you can find.
Out about lifecycle events of the animation so go ahead and check out Chris Bane's. Is sample code for more information so you can start creating these experiences in your application still: In the UI area we have this whole area that we call people which is about surfacing.
Content about the people that are important in your life as a user of one of these devices it's clear. That this is most of the stuff that that people do on their devices is interact with friends and family and? Colleagues and the ability to get back to those conversations quickly is kind of important so if you were in a chat application and then.
You're using something else let's say you're an email and then you want to get back to that you get a notification? From them and then you have to go through several clicks maybe go through the home screen.
You run this application again deep deep deep and then finally you're in the conversation wouldn't it be nice instead if you could. Just automatically get back to that conversation and that's what you can do now with the new conversations capability so here!
We see a sample notification we have a new area of notifications in the notification panel called conversations. And these are the pieces of information that were propagated.
From messaging applications for the people that this user wants to interact with you: Can long press on one of these items and that will bring up.
A Settings panel where they can set more information how do I want to notified with you no vibration motor: Or ringtone or whatever when this particular person contacts.
Me so you can specialize that you can also set the priority so you can say actually this conversation. Is the most important one it is about you know the education: The schools and my kids are in or whatever so please put that one at the top of the list.
So you can change the priority and then that actually changes the ordering within the notification! Panel according again to the people right it's all about the people so the way that you. Do this is you create this person!
Objects person is not a new API I think you came out in Android.
10 and create this information and then create a shortcut a long-lived shortcut that you will then populate. A notification with so you push the shortcuts and then you use messaging style here's an important requirement you have to use messaging style. Now maybe you already are this is also not a new API but it is a requirement of the conversations.
Approach and then you build a notification with the shortcut ID that. You created earlier up above for the long-lived shortcut alright. So once you have that information you're already in the notification panel you're.
Already in this conversations area you can also propagate it to an area that takes place all over the UI the new capabilities. Bubbles so bubbles actually existed in Android 10 already but as a developer options so that application developers.
Like you could start playing with it but it was not!
Actually propagated to users yet because it wasn't quite ready well now it is it is there it's full fledged feature. You can use it and propagate this information into bubbles and then the user needs to opt in so the first time?
You ask them to have a bubble in their UI then they need to agree to that experience. So you're not just popping bubbles all over the place where? Maybe the user doesn't want them here.
We see a sample that was written by yuuichi on the team you can see a bubble there on the upper left and when you tap that. Bubble then you get this a little. Mini activity in place right it's Institute's right there so what do you do to actually create that.
Experience first of all here's a little bit more information oh I should point out that! This is basically a replacement for what most people were using system alert window for system aware window is a really heavy. Hammer for doing kind of stuff it populates:
The UI with a transparent window that rides over everything and then they put this little piece of information in there I'm thinking. Like Facebook the messenger chat heads I believe use this and and other similar. Approaches elsewhere because it was really the only way to populate a UI that rode on top!
Of everything all over the place well instead use the bubbles API stop using system alert window because. This is really a better approach another tween the API could be abused? By application so this is you know because.
There was a good use case for this API we are making it harder to use the: The abusive API and now instead you have this yes exactly so how do you create these bubbles you're going.
To use the notification API which you're probably. Doing already you just need to add a little bit more information about it so there's a little bit of metadata about the bubbles information that.
You need to propagate and then there's information about this little mini activity that's going to pop up when they actually. Tap on the bubble so first of all you say okay I've got this new activity here and it needs to be resizable!
Because you'll notice in the sample that we saw earlier it was a smaller: Activity it actually popped up on top of that the that UI exactly in place when. They were on the homescreen right so needs to be resizable and then you need to create.
The intent for that activity you have this shortcut info that you're probably already!
Creating already especially if you're doing the conversation stuff and then you create the bubble metadata and create a notification populate.
That with the bubble metadata and you're good to go more information. About this is in one of the talks that came out with the launch is called what's new in system UI there's. Also more information more content that was published this week this is the first.
Week of 11 weeks in Android and the first week was all about people so there's more content on all of this stuff there's. The sample that we saw the screenshot from that's on github.
Called bubbles caught one so check that out and also we recorded a a DB podcast with engineers on the bubbles?
Team a few weeks ago and that's posted a couple weeks ago episode 140 called. Bubbles so I would like to talk about privacy: But I really don't think I should and in fact I really don't.
Think I will because is someone else is going to there's. A talk right after this from Joe birch so momma and I are gonna give this talk and they were gonna do a Q&A and then Joe birch. Is going to give a talk that is adapting your apps for Android?
11 privacy changes and he's going to go way more. In depth than I was about to so I'm not going to talk about this stuff at all so stay tuned. Listen to Joe it's what I was saying earlier like it's good that they sent someone who knows what they're talking.
About for this culture talk because it's very important so I'm glad that someone else. Is doing yes all right so one of the other things that we focused on in this release all releases. But there really were quite a few things in Android 11 was stuff for developers specifically for making.
Your development lights easier one of my favorites of course is Wi-Fi debugging because frankly there are never enough.
USB ports I took this picture it's basically.
Of my desks is sitting in front of me right now and it looks even worse now there's one dongle there!
With three cables plugged into it because I didn't have enough USB ports and now I actually have two daisy chain dongles because?
I had yet another USB device to plug in and again there were not enough USB ports? So we created the capability to talk to your devices.
Over Wi-Fi instead so very cool you don't necessarily. Need that USB port to plug into it it is a little. Bit of a manual process right now you need to enable it through.
The UI and there's also command-line options to actually set this thing up a pair and connect with the device. However the good news is I think it's Android 4.2 the canary that just came out has a capability so early version of playing with.
It within Android studio which is always the long term goal it's just not quite there. Yet so if you want to play with it in studio get 4.2 otherwise you can use this. On whatever Android studio release you are currently using another way we made things easier was by adding.
Even more annotations in the platform api's we've been doing this in previous releases in a couple of different ways so in each release:
When we add a new annotation it's one of these recently.
Annotations recently nillable or recently non-null and what that means. Is we just added this annotation we don't want to break your build but we do want to tell you that you're doing something wrong.
So when you are calling code that is not obeying the contract that. Is in these annotations then we will give? You a warning in your build on the other hand if we already had a recently annotation.
In there maybe we've upgraded into this release. To be either nillable or non-null and now when you. Call that code with other code that doesn't obey the contract we will break.
Your build that will break right there because you know what it's way better?
To break the build than to break: The runtime so please catch it at development time and we are hopefully.
Helping you to do that another way that we're helping is through crash reasons. Reporting one of the hardest things to do in debugging and fixing your problems is finding out. Why they crashed in the real world right we all have a set of devices emulators and!
And hardware devices that we use and we have you know this host device and we have apps installed we we try to mimic a real environment but there?
Is no way that you can mimic.
The real environment everywhere in the universe. Of all these different kinds of device setups and people with different apps installed in different memory? Configurations and so what we've done is we've made it easier for you to detect:
What actually happened in the fields so there's! An API to find out what happened to your application and then. You can upload that to your server.
And take a look at it and see what is going on so you can get historical process.
Exit reasons and then walk through those reasons collection information that we give you and find out. Did I run out of memory was there an actual crash was there an ANR now maybe you:
Would do this you you certainly could do this manually in your application. Maybe you already use a crash service like crashlytics or whatever and that's totally fine these craft services may also take advantage? Of an API like this under the hood eventually for example I believe.
The information on ANR's is really hard to get they kind of need to connect the dots but this gives them much more tangible information about. That so hopefully good both for developers as well as for library developers that that. You may be using more indirectly to get this information GWP a SAN is an advancement on something.
That we offered in Android 10 called Hwan Hwan was about using a different memory allocator basically. To to put an overhead layer an extra layer on top of memory allocation so that if you: Try to access memory incorrectly let's see a free an object then you try to access that.
Memory we will detect it because there's that extra layer of error checking. Going on which is great at development time but it adds both a lot of memory because now you're adding like all these other?
Methods all over the place for allocations in this in the heap the negative? Heap it also adds runtime overhead because!
There's this extra step to go through every time you allocate and free and so we've taken a different: Approach ewp a sin and you can use it in the real world so instead of being laid over every memory. Access it's it's sampled instead you can think of it as sort of the memory allocator equivalent of the sampling profiler!
It doesn't measure everything it just measures a few things here and there and if you happen to trip over one of those then you're going. To get really information about what you were doing and why in the real world. And it's so low overhead I think the size of the library is about 60 K and the runtime.
Overhead is negligible so you can feel free to bundle this with your application! And ship it out there so I should point out that this is for native Delaware. Developers so if you're using Android SDK at the java api Kotlin api level.
Not for you but if you are doing.
Native development like game development probably worth looking into and then also the cool thing about.
This is the reports are automatically uploaded to the play dashboard so what happens. Is when you actually access one of these things incorrectly it will automatically crash. Which it may have done anyway and then it's going to log a nice report for you and that'll go in your dashboard so to enable.
This you just add this into your manifest GW PA San mode equals always and then when you crash you're going to get a error: Report that looks a lot like this maybe with a larger font size a DB incremental is about being able to install.
Your application faster which we'd all like to do but if your application. Is huge we'd really like to do that right so you can use command line operations. And if you have a really huge apk it can save you up to like ten times in install time so imagine if you.
Have like a game with really huge assets it's two gigs and you've got to push this thing you've got. To fix one line of code and then push two gigs of data down to the device?
Can take a while right but now you can get much faster pushes and you can get even faster than. That if you just want the the code that. Is that you need to be playable so check.
That out yeah and if you want. To further improve your ADB push Fabiana song la had a really interesting talk at the Android dev summit.
Last year it was a short talk.
On USB cables turns out that not all. USB cables are as good as one another.
So it's only five minutes recommend watching it so you can find a better table it helps does?
It also help if you like should you have your device like downstream of your laptop.
Does gravity matter oh yeah okay all right like I thought that's how it worked yeah. So the way it works is you need to sign your.
Apk with this new approach and then do an install - - incremental and away you go and it only installs: What it needs to there are usually behavior changes in every release especially as we make privacy changes and we lock down the information.
That applications can access so that we can protect user data and make it more transparent to users but we're taking. A couple of approaches in this release?
That should make it easier for everybody to adopt these changes for one thing most of the changes that we're.
Talking about in privacy or that Joe birch is about: To talk about in privacy are only going to take place when you target this API level.
So you will target it eventually this. Or later but for now if you.
Are not doing that yet in this release then for the most part the behavior changes?
Will not affect you also you have the ability to toggle these behavior changes one by one to see.
How they affect you so you can test this much. Easier at Build time you could already do this for various things through the command line but the new cool thing that we've enabled!
This time is there's a new UI for doing that so we can see that UI here? If you go into developer options you can. See all the toggles you can access directly or you can continue using.
The command line so here if you do the the disabled command here then you could see the UI let's do that again what's. That you are wow that's amazing all right so you command line or you use the UI we're just trying. To make it easier to adopt these changes going forward all right so now we're going to talk about the real interesting stuff.
The only interesting stuff graphics in media so Chad is driving the slide! So Chad I'm just gonna say what I have to say you'll.
Figure out when to advance okay like that yeah yeah I first stop indicate! Image decoders so on the platform we have a number of image!
Decoders you know for gif files PNG web P jpg and so on tradition. When you access those through the image the color API or bitmapfactory the point.
Is that when you're writing native code decoding an image in the real awkward because your own age code. You have to up call through j'ni to the job a later make your. Code there but the Java layer will go back to Jane I because our image decoders on the platform.
And written narrative so there's a lot of overhead for absolutely no reason so a lot of apps are bundling their. Own decoding libraries and a lot of games do that which increase the size of your apk so the good news now. Is that we have NDK API is for image decoders so there's a bit of code!
To show you how easy it is to use first of all you point to an asset with an asset. Descriptor you get back an image decoder. Then from that on that decoder you can set the format of the bitmap that you want for instance if you need:
A high precision you can use the format RGB F float16 instead of the ad debates. That we use traditional and finally you just need to allocate your buffer! For to host a bitmap which means it's also a extremely trivial to reuse chunks of memory when you in native?
Code when you decode multi point matches in a row for instance and family you just call the decoder and boom: You have this beautiful image in the top right I don't I'm not sure what it is it looks like! A big nose it's a it's a teapot it's a standard graphics 3d object right all right.
We've also added support for animated Heath files so he for gif is a more efficient compression.
Format it's kind of like a super JPEG if you want like higher! Quality smaller size definitely better than gif or Jif a very pronounced it so now you can and give the he format support enemy:
Eight files or second gif as opposed to PNG for instance and we can load this animated he files.
Through the animated image drawable API just like animated gif and let me show you actually some code so you understand how. It works so you go into image decoder so image. Decoder is our new API it's kind of like the successor:
To bitmap factory it's much better it's only pet that. Makes a lot more sense so you create a source from from us decoder pointing.
To a file and then looking at the drawable that you decode you can. Check the type of the drywall and if it is an animated image.
Sharable you can call the stuff method to start playing the animation. And for those of you we need to use down. From NDK we had the CPI a called opensl es su vida stands for open sound library.
Just like OpenGL it's now deprecated instead. We have a library called oboe it's an unbundled C++ library and it was designed from the ground up from the ground up for high performance audio. And low latency so it's very important if you're building.
For instance a synthesizer or if you want to you know to Evan and the generates. Music on the fly it works all the way. Back to API 16 and it's open source you can find it on github so you don't.
Even need to wait 411 to deprecate open it cell you can already adopt mobile. And I believe actually that's dynamic slide we had an episode on precisely that of our Android developers backstage episode 135 so if you. Want to know more about that library please listen to that episode then we have support for viable refresh rates.
So since the early days the vendor in all the panel all the displays on phones run at about 60 Hertz more or less and that.
Means that for for applications that run their own render loop let's say you have a game or you have.
You know a heavy media application you cannot drive the screen yourself. The point is that sometimes you're doing just a little too much work and you can't hit the frame rate of 60 frames.
Or second and the points that because on Android we don't let you do tearing the only you will fall back to 30 frames per second. And get sputtering bad when your applications on the cusp of being able to do 60 frames per second so that means that your application. Will go back and forth between 60 and 30 in cerulean pleasant experience for the user so now we have a number of devices the:
Phones in the case of four that supports that support better for me it lacked many Hertz or 120 Hertz and on desktop and laptops now those. Those refresh refresh rates go all the way to 300 so I assume this will come through phones.
At some point in the near future what's very interesting. With some of those panels not all of them is that for some of them the system can dictate the refresh.
Rate so will not log to 60 or 90 or 120 the application can tell the system! For instance with surface that same frame rate what is the frame rate you'd like to have.
So let's say that you can only! Hit 45 45 frames per second you can tell the system the system look at all the windows. On screen and will decide based on the different information from all the applications what the frame rate of the display should?
Be so chances are if you build a full full screen application like a game you're.
Going to be the only one visible and you're going to get the frame rate you want:
On devices that principle is kind of this kind of features and he gets thermo api's so this is an API we had available in the. Java layer I think study in Android 10 online maybe one of the two and they can be important because not all the workers. Are aware that when you use the device heavily like when.
You run a lot of computations or if you turn on a lot of the the computing blocks of the device. Using functions GPU the screen the sensors the camera at the same time kids build up and to avoid Prime's.
That go from melting they are built-in protections in the system so when the when the heat reaches a certain limit.
The device goes into thermal throttling so it starts lowering the clocks of the different? Computing block so he lowers the performance of your application and the point is that there was no way for you to know that: And can be really useful in the game for instance the window device!
Is about to get into that state maybe you can lower the resolution or start drawing the fancy effect.
So we can maintain your frame rate even even though you aren't under a thermal throttling of course sometimes you know thermal.
Throttling can be much heavier than that for! Instance the other day I left my phone outside it was 95 degrees. Fahrenheit in California I went back to it and it was off telling me that it was too hot.
So I had to put it in the freezer. For few minutes to be able to use it right away anyway here's I learned this from my wife recently.
That the a lot of the dashboard mounts for a phone sit on the dashboard sit on the dashboard. Not just like in it but on the dashboard. And what do you use with your phone what do you do with your phone!
In your car you navigate right so you've got the screen on you're running a really expensive application that takes. A lot of processing power and it's sitting in the Sun the entire:
Time the hot California Sun bad bad combination anyway so now we have api's engine I so you register. A listener you will get the status some.
Of them are pretty scary if you receive their shutdown or emergency status you really need to stop what you're.
Doing something that's going to happen the critical status is a little more interesting. That means we are about to lower the performance of the device and you can do something. About it so as you can see on screen.
Super simple like in a couple lines of code you get the thermal manager you register the listener. And when you're done you can under history your listener and release the manager angle is a kind.
Of layer for OpenGL yes that news by Chrome for a long long time constants used?
On Chrome by Chrome on Windows to run OpenGL ES on top of DirectX that chrome only needs targeted single graphics. API so now it's available on Android we've been working on making OpenGL ES to run on top. Of Vulcan so the idea here is that there would be only one OpenGL?
ES implementation that we provide as part of the system which should help reduce the number of bugs or differences between the different devices? Different drivers it is not quite ready for production yet but in the directors studies you can turn it on if you want or the non-core application. So if you have an application that using OpenGL you can turn on angle to see how your application will behave you might run!
Into bugs which album you might see! A huge drop in performance please also tell us that it's happening because it should not be happening. All right so that's for graphics and media but there:
Are some other interesting ideas as part of the platform the first one is nn API that's. Neural networks and SE C API to be able to!
Execute neural nets so there's a number? Of new features available if for instance if and well?
You can now do branches in loops owner networks there: Is one new feature I have no idea what it does but it's called heart's wish at first I thought.
It was a bad basketball like you. Know he goes from the score hearts? Wish but it's not it's but neural networks and I'm sure that you know if you do machine learning and neural nets you miss.
Very excited by these new up codes there's. Also more control over how the the execution of your neural! Net takes place in particular you have fence compute so you can better order a chain of dependencies:
Without involving the CPU and the new memory domains lets you avoid unnecessary.
Copies between that cell you see the GPU an NP you or the CPU so you have better. Control of where data lives 5:3 so this is coming to you know a lot of the networks.
Out there so if FG gives you lower latency network and much much more bandwidth so you can be very interesting for applications. To be aware of the state of the network because the tech before they take advantage of those. New features followed by 5g in particular you want to know if you're going?
To cost the user a lot of money because if they pay by the gigabyte let's say.
And you start using all the bandwidth and 5g you're gonna cost the user. A lot of money you can also check the actual speed of the.
Of the network link so you can see an example on screen you can check if the if the network. Is mirrored or you can ask for the actual.
Bandwidth of the network before you do something replication then we have a new feature the biometric.
Authenticator strengths so different devices have different biometric identification systems there's 2d face unlock the 3d face unlock. There's fingerprints I think there's ice canners and I'm sure there will be more things later on so now there's a way and those. Different devices different ways of an authenticating don't have the same level of security:
For instance a 2d face unlock is easier to fool than. The 3d face unlock that make sure that you know it's an actual. Activity face and blink and so on so now.
What you can do when your code when you get a reference to the biometric manager you can specify?
The strength of the authentication that your app requires so then you can. Ask the manager whether or not the device can support this kind of authentication if it does then you can craft. Your intent and in the intent we can specify.
The strengths that you want so for instance you could imagine a banking application requiring some level of security before you. Can access you know your money and if you want a device that does. Not support the the strength that you seek then you can either.
Ask the user to go turn on the feature in their. Settings or just you know login in a different. Way or whatever else you want to do in the application autofill and.
Keep on integration that one is an interesting one so when you are when you have a different input field. In your application we have this photo field service to automatically enter your address or credit card your login and password. For instance so you have suggestions that are contextual but you also have a keyboard and the keyboard:
Has its own contextual suggestions you know do to complete so windy nice.
Both types of suggestions showed up in the same place so this? Is what we did with this integration so there are two parts to this there's new api's for the keyboards themselves. So they can receive the suggestions that they should display from the auto-filled providers and you know most of the time those autofill providers?
Are password managers you know like less pass or one password and so on and of course.
This needs to be secure so what's interesting in this implementation. Is that the autofill system does not send the actual data to the keyboard he sends Duy to present in a sexual fashion! So the keyboard does not have access to the security of your data you can see examples on-screen here for instance!
Here when you're sending in your suggestions at the top of the keyboard for your email and password.
You can have questions on your credit card or for a street address if that's. What the app requires each meant John so the way it works. Is pretty simple like I said they have two sides.
To it if you're writing an ami keyboard the autofill system will call on create: In line suggestion or request telling you that the the the autofill?
Wants to provide suggestions so you return. A request and in that request we can you can tell the system ok what your Cal's your support and how many. Suggestions you can present user then when you're done you will receive the on in line suggest suggestions!
Response and that is the UI that you need to display on the other side if your password manager you have this on file request. Method that you implement in that method you craft a data set and let the less that you can create in line presentations: And those are UI bits that will appear.
Inside the keyboard and when you're done creating the data set we get you just create. A response and be sent to the aim so that was it for the platform! But of course you must you must be used to it by now we have a lot of other things that.
We ship outside of the platform the?
First one is jetpack so now we have actually chat I think you're slightly.
Dated we have more than 80 libraries I think it's something like 150 artifacts and we really stand very often actually we have a release train.
Every two weeks so not all libraries ship every two weeks but every two weeks we do ship something? It's a lot of libraries and recently.
Actually last week we've had a series of new libraries so the first one is held it's a new dependency. Injection API built for Android on top of dagger so it extends dagger and entails features that are!
Specific to Android to make it easier for you to use dagger and this is now the solution that we recommend.
As the Android team for dependency injection. On Android of course if you have something else that.
You use and like you're free to keep using it but if you don't know what you should choose or if you're.
Writing a new app you should take a look at health.
Paging 3 it's a new version of our paging library it's now written entirely in Kirkland. It's our first library rewritten from the ground up in cutting. And it has two parts origins app startup so a lot of libraries to hook into the life cycle of the application or register.
Content colliders the problem is that every content provider that you register in the system.
Slow is there on the startup of your application value a little bit I don't remember the exact numbers which we're talking.
About you know 10 20 milliseconds something like that and every content.
Provider that you register for that purpose is slowing down your the startup of your application so now instead we have this library and it itself creates one! Content provider but then it exposes an API so that you can participate in the life cycle without having!
To create yet another content provider it's a pretty small library so I encourage you to take. A look at it in family camera X as rich data status so camera X is our new camera API that works across? Multiple versions of Android it provides features that are specific to different devices that's the concept of extension constants on the device.
That has HDR may have access to it via the camera X API and makes things a lot simpler: In general we also have jetpack compose so you've probably heard of it but jetpack compose. Is a new UI toolkit that we're working on it's written internal in Kirkland!
It's based on the reactive programming model and it's quite different from what you are used to in jetpack Campos. Every widget is just a function it's a very interesting model it's super easy to use and you know I've been using. The Android UI toolkit for the past 12 13 years now I wrote:
A good chunk of it and now the hard time using it another the music the controls.
It's it's a lot nicer I think it's not currently in alpha yet our plans. To release an alpha later this summer. But it is developed entirely in the open:
So if you look at the AOSP repository you can see everything that's. Going on and just like with jetpack we release: A new Developer Preview every two weeks so we're currently at Death Star team it's the jetpack compose Developer Preview - that's.
Our marketing intern and there's going to be death 14 I believe. Next week I think - there is a what sample and tutorial the jet news yes we're sampling tutorials on github if you.
Go to developer that Android comes - jetpacks - Campos you will have links to a code lab the tutorials we also.
Did last week as part of the Android 11 beta launch there was a I did a video where I show. Some of the new features it show to see what it looks like alright so good well it good place the good start!
Android studio we have three major releases for you first of all 4.0 is now stable. It comes with a motion editor for motion nails so motion out is a way to create really complex animations as part:
Of your usual but you know until now you are doing it in code. And with motion editor you have a visual.
Tool to do that and if there's one place where visual tools are extremely! Helpful it's for animations you can visualize all the states of your animation.
You can scrub back and forth in the timeline you can admit properties you have you have keyframes it's a really really. Powerful tool we also have the layout inspector it's a it's a replacement for hierarchy viewer better integrated.
Android studio you can see all the layers? In your application with the 3d view it also works in semi real-time so whenever.
You make changes inside the application let's say you navigate to a different:
Screen each refresh is almost right away and my favorite feature. Is that it tells you let's say you have a text view and the:
Font size is 40 very often you might have to spend quite a bit of time figuring out what style that forty number is coming from. So the layouts inspector does that for you all you do is click on the value and takes you to the XML file.
That the value came from we have 4.1 Android.
Co 4.1 beta one of the big new features is the database. Inspector so if you're using sequel Lite or room while your application is running. You can connect the database inspector and you can see everything that's happening?
In the database in real time and it's really powerful because you can also make changes to database. So if you make a change to the database and you. Use room yo you are your UI will react in real time as well so it goes:
Both ways again if you look at the videos that you watch the videos that we published last week!
I gave a demo of the database inspector!
Used in combination with with controls and family 4.2 canary so it has the wireless. Debugging feature that Chad mentioned and you want to use jetpack controls until we hit. Alpha of a list you have to use the latest canary so until now you had to use 4.1 canary!
And now you have to use 4.2 canary so we'll stay in the canary branch we've also done: Things that are outside of Android 11 we have a new Android game SDK it provides. Native libraries from game developers for instance from pacing we talked about framerate and it's important to be able to produce frames.
As fast as possible but it's a growing point to present: The frames at the right time and this is something that can be very hard to get right? So the graphics team built that frame pacing library to do that for you trust me a colleague.
And I had recreated the this library ourselves now in a rendering engine you do not want to do that please use the. Library play as a delivery delivery to distribute large game assets we have better profilers in Android studio so we have a native memory.
Profiler we have a better integration with systrace and you you can also access some of our previews for other development tools for instance?
We have an extension for visual studio we're working on the GPU inspector and will.
Let you do some some type of profiling for the. GPU which until now required tools that were specific to the GPU that's on your device and that were difficult to use across multiple.
Devices so check out that Android that comes such games if you want to know more so that's! I was about to say that's no that's not quite it there's one thing Google Play so when you publish.
Your app you have a new play console and so complete redesign of the UI much easier to use much nicer nicer visuals? You have a new section for the policy status a new section. To check the acquisition reports to know how you're acquiring your users and also to manage your team.
So who has access to the console and who can publish on that so it's currently. In beta if you want access please check out play that Google that comes hash console to know more so that's. Really it if you want to know more we have a bunch of launch videos that I'll just mention you.
Can see the URL on screen if you want to check them out so we talked about design tool system UI privacy!
Storage access curtain and so on we also kick-started this week the 11 weeks of Android: So for the next 10 weeks every weeks we're going to have a new theme so we just had people and identity?
It was about conversations and bubbles make sweets about machine learning. And you can see the full schedule on on the slide and we're going to have videos?
Samples tutorials every week so you'll probably be tired of seeing chat! Very soon because I believe is gonna end see a lot of it and of course. We have android 11 meetups all over the world you're I believe you attend we're doing one of them right yes yes all right?
All make sense it's very recursive reference yep so you put it on you to attend another one but if you have friends. In other countries would let them know they might be interested and of course.
Chet had to plug in his head you yeah dude you need to find better. URLs do that I'm working on it there should be a single! URL every couple of weeks chatez this segment called now in the Android it's basically a summary of everything that's!
Going on in the world of Android because of what is happening it's actually pretty hard. To enforce to like stay afloat so and because. Chet loves attention he publishes articles videos with the same content and a podcast with the same.
Content so if you want to hear the same thing.
Three times you can and that's it for us and I think we're gonna. Move on to a Q&A first we're gonna pause awkwardly while they yeah we're gonna pose awkwardly. Now so we're gonna take a two minute break right now and then we are going.
To return with five side check so yeah I'm gonna remove you from stream now hey everyone so we are going. To take a just a quick two minute break and then.
Give an autograph you hey everyone so start our. Fight side session where we will have more engineers from Google's Android team join us including yet bore our heat.
We are and Emirati Annette along which I turn domain: So let me just add them to stream hi eat how are you yeah I'm good how are you please?
Introduce yourself my name is Heath I work in the Android team must undo each other libraries yeah good hey Murat hey how are you good.
Good how are you yeah I'm good please give a quick introduction for our audience so I'm route. I'm a developer advocate the Android era yeah good let me I checked and Romain hey everyone again hello? Again so we have all of the engineers here so now I'm gonna go out and then I'm start presenting the questions which.
We had from our audience permanent feature Oh shall I take that one I think we answered.
This during the talk no it was it was basically pre-release in Android ten because they had some finishing. Details we talked about it on the podcast actually: I asked them why but no it is a full feature the API is stable!
And solid and we would like people to start using it I don't know if there are limits there's no idea huh this. Is a great example of a question.
That is a really good question to ask that we don't know the.
Answer to so I'm glad you asked this so that we could say that try it out and let us know how many how many cars can.
Be presented write a for loop just. Like you can in some of the new and and API implementations in android: 11 and try it out yeah I think because it's a wild yep custom format.
Of media yeah if it's not recognized as what image video or image video or audio use these torchic system work for that's right?
Yeah you need three of the system that come on speaker down yeah: It basically it is a way to enable it's a way to bring the user into the decision because you shouldn't be able to pick: Arbitrary files with your application without their knowledge right so we limit you to media?
Files from the application but you can bring the user in if if it's a file that's not recognized as though package manager so. I would recommend you watch one of the talks?
From the launch videos this is probably. I think it's in the the privacy changes talk specifically where by defaults all applications!
Have to declare the packages that they want access to there is a mechanism to declare?
That you need access to more but then there's some process. I think of manual process that you have to go through to be posted on the store to make sure that we have to vet that.
Applications are doing the right thing you you can't just say yep I want access to everything. And then it goes out there so if you're an application that does need valid access there: Is a way to do that I don't know the.
Details but watch the talk because I did see this in the last couple weeks in one of the videos.
Yep Mervin yeah land reps Jen use the query old package of sperm take a look at the google play guidelines: On ax which can use where all packages but yes launcher X: Is one of them yes this question hey do you want to try to forestall the question that:
Came up last week like wait you said it was alpha and then you said it was recommended yeah actually. All right yeah I think Chris is coming into context of how we recommend the library this is an alpha because you usually don't.
Use auto libraries now it's not like when we say here this the recommended is immediately start using it today. That being said the reason why we are so comfortable until? Compared to like many other libraries is that this is a collaboration.
With the Duggar team and they used to be exist a very similar library:
Inside Google that they use so we didn't. Create them from scratch we actually work with them to change that library to be more public consumers but just inside Google.
This why we are very comfortable with the world till we know it's killed very well like we know we keep.
Those main use cases this way we're okay to the commanded? Point right now but the library is still alpha that. Means we are going to make API changes there will be occasions but for us to be able to make.
Those iterations we need feedback so please. Still use it what you know is an upper library not necessarily you'll believe some.
Code but thank you so much if you are happy with their good and if your setup works more reason to change. It basically so there's one part storage when! While writing guild we also create and take it with the jetpack library so there's possible cases like manager and their integration you need to follow a.
Bunch of stairs to make both of the work together and now we feel there's. Just one factory we give you you give it to the work manager and forward so a: Bunch of the deviations near application would seem if people to become much simpler so if you have time to do that.
You may benefit a lot but you're set on words like there's. Doing not much reason to change something that works like I don't. Know if there's specific timing on a bit like.
York your application is considered to be actively in use when it's in the foreground and for a short period of time after! It goes into the background it's not like immediately when the window goes down the permission is removed. But it is a short time after that so I mean it we're not talking hours here it's it's just considered to sort of be in transition when?
It goes away from the foreground I think that's what they meant so if you're using you know we never. Keep on making this too crazy right.
Now actually I saw manual from the SEAL team he just tweeted something we can.
Find that I've added to the notes later on how you can scope your view models include navigation graph file using LTE injector. And time to figure out how to make.
This an API so you don't need to go through that but it's a little bit more complicated because the vision graphs company models. Don't feel it belonged there like a single fragment or a night creature so they own that is not very. Well defined so until that comes but check check out the treatment menu has implemented if you're asking.
This question outside the football field and I like if you're using dagger we have this sample of the guitar teacher component!
Sample by it will show you how to do more binding things our new model injection you can do that decided yeah brain works. Like I think they're just looking for extra. Credit they're putting as many jetpack buzzwords in as few words as possible.
Like they got dependency injection and hild and view models. And life cycle by definition and navigation all at the same time in one short.
Sentence so I think they totally they win the jetpack contest if we had one is this like a tricky question. So I start talking about the super-secret projects we have:
There are all tricky questions in the open anyway so you just have to watch your comments oh yay oh SP is like the most boring video. Live stream ever Oh Murat do you know this one I know that there is a difference in some of the behavior. Changes we have in terms of like having to target new API versions yeah actually incremental location access is already commented.
In Android q it's not a big change but in Android are we just made it required.
Instead of just being recommended so if you previously were following the best practices you should already be think that in an incremental way. But if you haven't implemented the idea you need to first ask the foreground location then give users some time before?
Ask I think the background location access do you know if this is one of the behavior changes where it doesn't affect them if they don't!
Target their release or does this affect all applications okay I know most of them were relegated to target.
SDK but I don't believe all of them and I can't remember for. A location I don't remember I know my favorite?
Feature should we all name our favorite feature in Android 11 do you have one it is another question engine! Oh but I want to interpret it as that important change that's hard maybe I would recommend!
Everyone to watch the upcoming right yeah I mean it depends it's it's really these things are comparing apples. And oranges right like the privacy changes are really huge like what the way that you treat your users and their data is hugely important and! Critical and growing and need everyday right some of the explorations that we do in you eyes can seriously impact productivity and everybody's.
Happiness with their device and their usage. Patterns over time so maybe the sums stuff in in conversations:
Will be hugely important but you know it's early days on that hard to tell IME animations are just cool I don't know anybody else. I realize because the terminal let me just use I. Can throw it food meal and I be using that feel but you see these features very?
Slowly coming into the device every week I was like wow I didn't know this was an ember. No feature I don't you always had it for a while yeah.
If I don't think I get that? What I like to keep everything is cool so like I saw a review!
Where they were just going gaga over the controlled stuff.
But I don't have like a an automated house so sort of depends on where your life is at.
How important these things are I like bubbles now there's a standard: Grade to turn off those well I mean that there is one of the.
Reason the one I we do have more privacy features.
In the US right because yeah you can save/load applications and we want to make sure that you know applications.
You know the matter where they come from respect: Your privacy so I'm not sure what can of the features are talking about that are controlled.
By the Play Store itself you know in place or we work applications that were malicious or like break.
First and if they're good applications but if the usually suppose the third! Party after then taking its toll any application is further.
Above it to find out actually I think we see my uncle very nice things about Android but if you're a regular users? You are saying but you know if you know what you're doing and you want to find out an apk I'm going to prevent.
It from people all right I think. It's fine because the user needs to make the judgment to like the same of those securities and like pick another one which. Might open a cool app store as well as not malicious one and that.
Would be only a tiny person that you're humorist and we hope that. They know what happened I know what is the new original splitter you know - uh yeah it's just something.
Happening in the framework team that allowed resources you loaded dynamically I don't. Know the details but I believe it's a platform change which means I really.
Don't think this is something that can happen how about the platform.
In general because I'm seeing I'm looking at some of the like let comments coming from YouTube it's in general we back what. What we can backboard unfortunately a lot of changes have to go in the US and the only kind of back. What we can do is just an API you could call that with either.
Of you know up on all the versions or maybe they have some kind of fall back but when you start touching talking: About resources you know yeah graphene stuff. Like that it's fairly unlikely that we came back for anything the the second question that certainly.
Some II we can pass under the team I don't know what. Their plan is for samples I I thought the appeal for this was fairly niche like not necessarily applying to most.
Developers but if there's interest in people using it more broadly we can see if there are! Plans around it yeah and it's also yeah I mean there's. A point here right like we often there's a finite number of things we can do and so we have to choose that you know.
Whatever it's we build every library we build is something. You have to maintain and your ApS that we build so if there's a lot of demand.
Maybe we can look at it and then it will scream at me for making. Him do more no I I was just talking about the sample. It's just the last part of the question oh yeah that.
Was bad so we certainly thought about this couple. Times we actually we even today in UX research a year ago so understand like how people are using. It and like what is necessary I know and I'm grateful for that enforcement finally.
After we kinda need to see more like at the time I mean did that research there wasn't really that much demand ideas solutions already. Made for people to do the right things because I mean one of the things about:
The storage is I you need to be more specific: About accessing the users device from like it won't be like it was before. Where you could eat whatever you want and from the external storage.
Amount so you have to change your application we we also consider like providing maybe a library!
That works more similar to app compat we're like it mimics the behavior in the newer versions but in the older versions. But there will be more like restricting you on the older versions to provide the new features. Whether it's oh this little big we are looking at if you have like very specific new changes you're free to reach out to me or anybody.
From low correlations but so far we don't have it right now. I could suggest a really easy version of that library. I know you like easy libraries in your team you wear just whatever they ask for you just return no it's just it's the most?
Restrictive version of storage access possible so it's it's very it's very secure what was that isn't that the what the platform. Does already there's there's an asymptote that it's approaching it's not quite there.
Yet but the library could be there immediately but yeah just just to emphasize which was saying. We we are aware of some of those.
Pain points and it's the kind of stuff that we take into account but you know it's:
Also difficult sometimes because there are changes like this. That will affect some apps heavily than others but we have to look at the entire ecosystem. And you know you have to make a lot of difficult decisions and?
So we've been talking about storage and I think we'll keep thinking about it I do not know I think the general approaches just if you're using the?
Best practice for permissions you should already be able to handle! This because they can deny you at any time right they can go into settings and they can take away the permissions that they. May have granted earlier which means your application.
Already needs to deal with the situation so I think whether it's being denied because. They flip the switch in the settings panel or whether be we took it away when you went out of the foreground?
Like honestly it's kind of academic right you just! Need to handle the situation because you cannot control what the. User is going to do I do not know yeah it's!
A long for the days where I knew with all the API is on the platform: This is just too much no so we have you I mean we hope that this will be available by desire and. If you were watching navigation and pragmatics.
We made so many major changes of the last couple of months and there in preparation to you know for one! Of the goals is payload back stack variation by toda over the span of other eight nine years we dig ourselves a very very.
Big hole in navigation and as there in fragrance there's a really long time to dig out of it to make sure it is actually?
Cancer for something like powerful by sex I want the severe course but changing pregnancy a little. Complicated because all the years people divide on the positive fragment and how you fix the bug you break their application so every.
Change we have to be super careful to make it stable. Very steel via it is coming I. Just cannot give it my frame if you move your entry.
Power brother I'm you get us reported. In fragments and then what being a glad the primers partly fiction very well on the navigation:
Side the problem is with the case in five months it's not going to be an easily: Yeah because when you change five months out of. Pittsburgh there is not what app startup.
Is for so I've started and yet correct me if I'm wrong because I know what it will be but yeah it's really? About giving libraries of way to be notified you know the application? Was starting so you can start initializing something it's not it's not what you should?
Create a splash screen or anything else? Like a good example for instance the library in re that ever edit in your application even to know the application studying so it can start! Monitoring memory so this this kind of library would use app startup to initialize?
Itself I think this is a repeat of the earlier question well for any of the automatic. Automatic decision we make in the system I assume you could find you the answer.
Or you can punish find it in the source code of a OSP but it's. The kind of stuff that we probably will tweet or might? Get tweaked so yeah also I was wrong I was I was uh mistaking this for one about the when applications went into the background no it's:
When you when an application has not been used for some. Long amount of time and I'm sure that the code is written for some specific.
Long amount of time right now but as my mom said this is just what we happen to be using right.
Now I wouldn't you know we we don't really advertise those values because they could change over time you know based. On what we learned father homework what my gosh I know this question.
Just games like we'll check this is this is the part about when the in process.
Scheduler is explained with the Linux work: Can I have to follow up with you sorry I do not know what the accept changes but the. Idea is like we used to limit.
You and now we can run all of your workers in parallel. Ization it's not necessarily better per se I could do more work in parallel they it usually helps me to throughput I have to talk with.
The work major folks to see does this mean any me like public API team but I don't. Think the changes there publicly it just changes I think this question came up in the podcast. That we did with Sameer and Raul a couple months ago I can't remember.
Which episode but I don't know three or four.
Months ago we published an episode and work manager and they talked about scheduling limits I remember the question: Came up I cannot remember the proper. Answer but you can go back and listen to that if you want to hear it from the!
Team not that I know of but also we never comment on future. Stuff easy answer well if the subtitle is not a file which. They have contributed then you need to go through system dialog to ask user choose the file someone.
Good the question was it is going to play which attack compose I know but. The team has been thinking about it quite a bit I don't remember what the current.
Status is but yeah that is something like safe state is something! That you know we want to handle but remember.
That compose is a UI toolkit right so it doesn't invalidate we're. Going to work on making sure you can clean eyes with navigation. I'd like or whatever else you know that idiot wants to do but itself like doesn't change anything about the way the marks.
So yeah was Tommy the way for you to be able to say you of state and restore your state but the way it works in compose the. State is not the widgets like you pass to state to the widget found in the application so it's really up to you there may be some trend!
Instead that we might need to save like for instance on rotation or stuff like that but overall it should. Be a lot easier than it was in the past and that's one of the main points of jetpack compose like there's only. One source of truth for state you know it's your model it's not the mall of the widgets and I should point out too that in the world.
Of jet pack compose is not called processed death it's called decomposition whether. That actually already saving Campos okay he's been already implemented: An unlivable intelligence a steak and a lot like the same?
Art auction there's no emotional just take care of it for you okay I did go ahead and check that work when everything. The API mentioned is there's nothing to hide mentioned that if I was confused the max digital! Limit so let me repeat that to arrange a question it was like in the video I mentioned will mention.
Now in ransom over cruising 400 that means that risk is immoral that is about the in process manager make a machine the. Question was like am i approaching from the next page the minute there's a limit all work measure itself in terms of how many systems scheduled:
Because the system gives a hundred inequities process it's fine each application so if you wear some libraries the postal. Schedules yeah and you use the workmen there were played you go that like speed with a hundred jobs start canceling.
The jobs of the other code you have using this Mac schedule in a gang population from Server? 2008 like don't use more than 50 count that keep yourself so it was there's no job for your own application but that is unloaded now: I think the questions are for all right and I think that was the last question.
Yeah hi so yeah we are gonna end this session now so thank you all offers for joining. Would you like to make an ending statement anything. You want to add no comment thank you nice go thank you thank you everyone hey everyone thank you for all the questions we are.
Going to start with our next session in around two minutes. So we will see you then you hi everyone welcome. Back so let me just add you to the stream hey Joe how are you good morning yeah Joe is!
Joining us from UK where it is quite early I can see you're having your coffee. So yeah let me just add your screen yeah Joe why don't you go ahead and introduce yourself and over to you my name.
Is Joe I'm an Android engineer currently working at a company.
Called buffer based in the UK so yeah!
Nice and early for me this morning but I'm happy to be here and be talking about Android 11 and how we can. Adapt our applications to some of the changes that are coming so yeah it kind of going off. Of the talk that the sessions that we just watched and hopefully duh some.
Insights that this session will give you so before we get started just wanted? To mention about any questions if you've got any questions that come up throughout the session do put them into. The chat and the organizers will have them ready for the end of end of my session.
So I can answer them and this just helps with the flow of things and likewise if you want to reach? Out on Twitter and I think my twitter handles on the? First slide that at hi there Joe so feel free to reach out there's.
Any extended questions that you might not want to ask here so with that in mind I'm gonna go ahead.
And get started so privacy changes and privacy as we know and as Android engine. Is there are this is an area that's constantly changing in Android it's evolving and you know that it's for the best.
It's for what our users want people are more concerned about privacy. And I'm sure as users of Android ourselves we also have the same thoughts a byte and I remember the first time that we had:
Like bigger changes we saw script permissions introduced in Android 6 which required a lot of changes and having to request!
Permissions when they're required and then having to be sure to check those like as if they're those! Provisions are changed and and so on that was quite! A big change for the development workflow:
For features and then we saw privacy improvements gradually put in price place as he went through hundred! Seven hundred eight hundred nine and then Android ten we saw the introduction.
Of scope storage as well as restrictions on background location access things have always been changing but the changes that were made in Android. Eleven kind of paved the path to evolve.
All these enhancements that come with Android 11 so some of these are changes that we are required to make and some of them kind of enhancements are offered to! Help us understand more about the data that we are accessing so first one and seems very fitting as we were just talking: About permission changes and so the first change.
Here is what's known as one-time permissions so when given a choice. Users are choosing to share less and less private data with the applications: That they're using and Google also saw that there are many apps which were requesting background location access when?
They didn't actually have any need for it I'm sure we've all open applications and being bombarded with permission.
Requests as soon as the apps launch and you're like what's! Going on why is the apps need this and and it's quite has been quite habit. For application is to group the permission request because it deems to be easier so based.
On the feedback from users and developers androids. Can be giving more users even more granular control over the privacy of data so this includes location access.
Camera access and microphone access as well as significantly limiting access.
To background location so a sickly look. At a couple of examples so users will be able. To grow on temporary one-time permissions for occasion permission requests and also for microphone access.
So let's suppose this is an application such as a conferencing up that is rarely. Used you know we go to copper at the moment:
We don't really go versus in person but when we go back to codes Congress? In person you're usually have an application you have the schedules and you know you use that application maybe once a year twice a year.
And so you're ready using it and granting permission for those applications that you rarely use seems like a heavy. Burden and so in these applications users.
Can make say voice only calls and so on um with these one-time permissions users have the option to not permanently commit:
To that permission such as to record audio permission and you know you know when you're granting that permission you're. Using it permissions only use at that.
Time and as soon as you leave the application that permission is revoked and the same apply is to camera access.
If the same app also supports a video calls the app would request the record video permission and the same would happen. When the app would you have to so you may have this important question in mind what. Does this mean for me as a developer what do I need to do to support this and the good news.
Is that if you're currently following the permission best. Practices you don't need to do anything. You know if we as mentioned do the last session if we're following best practices of requesting.
Permissions when they are required and checking the permissions are available when!
We try and access them we shouldn't. Need to make any changes in our applications here so let's take a little example in terms.
Of some pseudocode so say we want to access a location feature in our application and what happens here on the left hand side! Is is what happens if we follow the permission best practice and so first we check if the permission!
Is granted and when this is first run. For example the permission isn't available so next we will.
Let the system decide if we should!
Show some form of in app UI to give an explanation of why we need that permission so normally. Not always the first time the system will!
Consider that that is needed and finally. We get to the point where we need the permission so say but this! Is the first time requesting it so in this case we request the location permission.
And this lets this prompts the system will prompt the user with the free. Options and and this will be whether the user wants to grant it all the time or grant it this. Single time or tonight so let's say the user presses the deny button!
In this case the on request permission result.
Callback will be invoked and the permission. Will be rejected and so when this happens again we should make sure that we explain the functionality will. Not work and without that permission and maybe you want to use a snack bar or some other!
Form of in-app instruction and and that's what most applications are doing this at the moment and if the permission is requested. Then you know you can carry on using it and but the important important thing here is that best. Practice and might it may be all apps case it's already following this but being?
Aware that the user has mentioned again in the previous session I think Chet said your user can revoke these permissions at any time!
And and having that one-time access I think strengthens on that statement even more like that can that. Can not be available the next time I'll user launches the apps and we need to make sure that we're checking.
The permissions and handing them correctly and so if the user grants.
That one-time permission in in that pseudo code so in terms of some examples of. When this data will be available and so with that permission granted that single.
Time while the apps activity is visible that the permission. Was granted in the application can access.
The data if the user brings were apt to the background. Your app can continue to access the data for a short period of time I don't think there's the define amount.
Of time and but it's let's call it short period of time if you launch a foreground service. While the activity is visible and the user moves to the background then continue can continue to access the data until.
That service is stopped and finally the user revokes at one time permission! Which can be done anytime in the system settings then kind of your access! To that data is killed um regardless of whether you launch with foreground service or so on and that is not available anymore.
So once that permission is revoked at one time permission the next time user goes into your application. And that permission is required we go for the exactly the same process again and that permission.