Android Rasgulla is here. We mean Android 11 of course, and held an event in its honour. Together with Kotlin Community Mumbai on Saturday, the 11th of July, we brought two rockstar speakers to our lineup to talk all about Google's newest little green robot. 'What's new in Android 11'. By Amrit Sanjeev, Developer Advocate at Google. 'Adapting Your Apps for Android 11 Privacy Changes'. By Saurabh Arora, Google Developer Expert for Android.
We focus on this is more like. A heat map of the things that we had from a timeline perspective like you all know we have.
Developer previews than beta releases and then define. Cookies and that's being leaf being the.
Way we have released Android in the past many releases I think I wanna call out here is that we're out of Developer Preview right now we're close. To be at loss we are in beta 2 and the whole idea of doing this approach:
Is that during the other perp review phase it's for developers:
To try out things and see how this works on for their applications what are the new changes how these? Changes will affect their application this is a face where English should analyze the changes! And try and give feedback one of the things our regionals will know at wing is sharing feedback.
If I go and ask her developer what do you think about Android level there are 10 comments to commence.
Towards it and they're all very valid. Thought through sort of answers that I get but then when we look at the stats. Nobody would actually communicate that or share that experience:
With the team so that is some an area where I think all of you guys can actually improve it's not like you're talking.
To a wall we do take we might not be able to acknowledge. Every feedback that comes to us or every mail that comes.
To us but they we do take all that into account and during the vapir prima phases.
There's a lot of changes that are made in the US but to kind of better cater to the use cases in the real world. Because as engineers the team is actually building these features will actually make assumptions will actually might not know every condition under which! A feature gets used or how a feature is getting used so real world.
Feedback really helps us fine-tune things so a lot of features actually get changed during this time so during Developer. Preview one of the things that really wanna call out is don't go ahead and jump jump ahead and start changing. Your port because a pear contracts the behavior can all change during this phase this is for you to analyze what the new features will:
Be what is the direction of the new features and if any of them is actually going to affect your apps during. A beta phase battles where that would be best time when you want to kind.
Of go ahead and start thinking of what changes are you want to make your application to adhere to the new guidelines. Or to implement new features in your: Application because by beta most of the API is are gonna be stable there will be very minimal changes in the beta phase.
That happens it's more of stabilization that comes in and puff platform stability comes halfway! Through beta and then we proceed towards the final release so the thing to call out reiterating what I may said during. Developer Preview please do test your applications understand the changes but and understand and identify the areas where you need to change.
It would be advisable not to jump in and change those. Things but wait for the beta where the API contracts as well as the behavior. Is kind of finalized and then start making the changes and before the final release are ensure.
That your app is compatible because the most early adopters will actually adopt: The OS for your app will most probably adopt the OS also faster. Then you don't want them to have.
A bad experience it is not like if the a bunch of your most vocal users are actually moving to the net latest version. Of Android and then your app crashes then that would lead to a bad experience and that's what you want? To avoid and that's enough time so step 2 milli?
A third quarter is enough time for teams to make these changes? Incrementally and another thing that I would say it definitely for people? To plan is don't make all the changes one shot I understand that most teams make this changes in multiple.
Sprint of their have multiple sprints and say if you take somewhere from me to q3 end of q3 or mid. Q3 there are multiples presence that everybody! Would be doing make your changes go in ah in each of these Sprint's incrementally so that you don't have to make one really large change:
Towards the end the stabilization of your app becomes a real tricky point to be and you. Might wanna roll back you might have rolled back and things. Like that just to keep the stability back it that is again another recommendation that we generally give so that developers.
Have enough time to roll out incrementally and maybe enable the feature later that's. Fine but you wanna test in real the stability of your changes as well as how users are reacting to it you don't.
Want one human change going in and. Having some effects which you're not sure you're not able to track back to which feature or why if there's a negative? Impact why that has happened for you yeah this is basically what I meant earlier so review the program timeline set up an environment that's really important.
During your level preview please set up an environment sometimes you might not have the device for which. We release the OS for you to set it up but emulators will be available during that time go to the new studio setup ensure that you use.
The new tools understand because a SBK it is much easier to go through the SDK documentation chef studio and as a developer. If you have students well that'll be a much easier.
Way to do things and learn about the features changes in behavior and tests! Era that's basically what you should be doing link develop you moving on let's start with the privacy changes! In a grade level so there were many things that we considered in Android ten itself a privacy was something that.
We took as a really core in here to improve especially for users data. Our users data as well as privacy we took a really strong.
Approach towards it and above many areas on Android existing things that were changed and there were also new things that we introduced. Things like the things like location control location location and already there but we tighten.
It up whereas us of there is like completely new things were introduced like one-time. Commission those were completely new features so all these privacy changes are a collection. Of changes to the existing behavior as well as some:
New features which you can take advantage of to provide better experience to the users having said that.
Some of this new behavior can be more restrictive so you really need to kind of look at that part and understand and ensure your users. Are easing into the flow rather than suddenly coming in and having a negative experience on your platform because you just. Moved too quickly or jumped to use the feature too quickly without:
Training your users now at octoscope storage school students was something that we introduced in Android 10 but during Android 10 during the Developer Preview phase we got!
A lot of feedback saying that this there was not enough time to kind of adjust.
All the changes that were there so we introduced a flag called as like is request like AC external storage which allowed.
You to put this flag in your manifest and make make the system behave! Exactly like in Hanoi behind without applying the scope storage changes.
Now if you take scope stores for instance I like to take an act memory. App has an internal storage as an external storage school storage really works on the external! Part of it the external storage is ID divided into two parts one is where the app the files at I could create and then.
There are things which are common in till Android 9 the behavior was that if the user gives the permission to need files on an external storage the app: Will have access to all the files.
An external storage there was no restriction on what files you can feed and what files you cannot and that created? Some confusion based it or where that created. A privacy concern because a lot of apps were actually using it using transitive data like okay this folder is there maybe.
There is a maybe this application is installed so using the external storage and the files within the external: Source people were trying to understand what what is more data and what they were.
Expected to get from reading a file and there was a lot of misuse of this and in scope. So is what we've introduced us if you. In scope storage an app can only access the fires that it has created.
And there is also things like media files and. The rest of the files will be considered and it can can be divided two buckets one is the media file and the other one is basically all.
Your other files could be documents PDFs and other other stuff so media files like us like audio. Files for those video what we do is we have these gated a gated area behind!
The media permission so when somebody wants. To access a photo which is shared? By the camera app the photo if added to the media.
Store and the user has given the permission. To access the media store the user can go the app can go ahead and read. The file so and and make edits to the file there is there is multiple change so this allows us to kind of give gated permission gated media.
Stores to which users apps can go and pick information which are media files. For any other file you would have to use the system picker the impact! For a regular app which has file handling in it would be that if the app is using a third-party file picker you need.
To test to ensure that the storage is not breaking the the third-party library is updated and scope storage: Restrictions are not not restricting the functionality of your application? So please go ahead and check most people have used third-party.
Libraries for file operations and and other things like file operations and things like picking: File file picking and things like that are they the recommendation is to use file picker the system. File picker and not a just a file picker and not to use the a third-party one and third-party ones if use they have to kind?
Of ensure that they work with these restrictions that makes it tricky so please go ahead. And test this if you are using that in your application the next one is there are some areas where files need!
To be accessed all the files need to be accessed say something like a file manager if there's that but a fine. - is that you will be then you need access to all the files right the same is the case of the backup?
And restore file it needs to access files which are which are created by other.
Applications without the users interacting with it ah another one is ant events for all these sort.
Of things there is a new access permission special access to it where which will allow all the files? To be accessed but again for you to access this there is a plate policy right now I play policy that is guarding.
This ah that is you will have to adhere: By that guideline to ensure that your app gay has the gets this permission now then this this is being worked on right now you will receive? Communication about it very soon and you should ensure?
That your app needs that full file access as a price for a primary use case it can't be a second to use case? For example if you have an app whose say job is basically to show. A gallery which doesn't which only needs to look at the media store photos media store:
Or the gated area you don't need all the file access but then you by adding a secondary feature of a file. Browser you will not get the side you will implant on she will not approve this?
So you need a big you need to read that policy very carefully? And ensure that your app has a primary reason otherwise let the users choose.
To choose to give you access to the file explicitly now one-time permission is another. One which is introduced or newly with one-time permission what happens is you can actually provide permission for an app for a particular feature like camera?
Or a location to give it only for that one session so a session can. Be considered to be when the app is in the foreground as long as the app is in the foreground or as long as an foreground. Service is running in both these conditions you still hold the permission the moment the app goes to the background and there are?
No no foreground permissions or with location permission with location location: Based foreground service then you will use the permission the next time. Somebody in the quest for this permission the dialog.
Will come up again and the user has a choice to kind of do this give this or deny it again two things to note. Here one you need to educate your users:
That each time they might have to give this permission and you will have to identify use cases where you don't want this permission to work. There are instances where people have a sign-up process which may say he has as the location. Permission or or the camera permission and for a subsequent use case where the camera permission needed they are not really checking for it because earlier that.
Permission would immediately given to reach that point in this case it might! Be tricky you will not see if it's a one time access. And the user has come back to a different!
Session then the user will not get that permission in the second use case so you've. Got to check that the second thing is deny has a slight change in behavior when the user clicks deny multiple: Times then it is considered to be deny and.
Don't ask ah so if the user. Is refusing to give you the permission for a few times. Your app will not be able to show up the dialog and ask the user for it again so this is something that you've.
Got to be careful or you want to kind of ensure that this cases these cases are considered? When you're making when you are actually working? With this change and there is also another interesting:
Thing which is auto reset permission so if your if. Your app is something that if a lot of people install a lot. Of apps but some of the things then the stats say that about 60% of this apps are not used very regularly.
It might install and forget about it but because when they install and they use it for the first. Time they give all the functions from then: On the app has all that permissions work now with Android 11 another thing feature.
That is coming in is that it will actually we set the permissions of apps. Which are not regularly used so if you install a say a new gallery sorry a new of a file manager.
Give it some permissions and then you do not use it for. Many months when you go back to the application you'll see that the application no longer has those. Permissions and all the permission requests will start coming back again and this will affect only apps that.
Are actually targeting Android level but that will be the case if if not today it will be what then with the next player. Lay minimum level SDK which is coming in next year they all the apps will have to adhere cut this so apps which are installed. And get the permission one-time doesn't mean that you always have this permission so you have to understand that you have to understand that?
You have to check for permission for more rigorously and not assume that you have permissions! For all the things when approved upfront are there are applications which might be just for services that are running their.
Own you come into the UI as much and for such things there. Is a new setting for you to toggle the auto reset! For a particular app so you can go to settings settings application details setting screen is where you.
Need to go in and then you can actually make sure that that reset process:
Doesn't have happens for that app and this is something that you can uh you can actually code into your! System if it is necessary now with foreground or if you if you remember foreground services have different. Types that were introduced in Android 10 apps can declare those permissions.
And then only get access to those sensors or data say for example if you wanted? Location you had to declare the program service type as location otherwise then the app serves the. Request for location it used to get null even if the fused location provider?
Has the data it will not it the service will not get that now there were other media other DIF other types for? Home services also declared in Android 10 now in 11 we have two more.
Thing microphone as well s camera microphone have not seen many cases where program services needed continuously but with respect.
To camera I have seen some people using the foreground service to kind of a cold start the camera like really? And ensure that everything is loaded into memory and things like.
That some of those use cases will be affected because.
If you don't declare the foreground services to be to have a camera intent the issue that will come across is that come.
Across is that from the camera sensor no data we come to your service so and the service will its this will.
Will not crash that is another thing your services. Will not crash but it will not get any data and that is not the intent of running.
The service right so you want to run your ad test cases. To ensure this doesn't happen for your application now when it comes? To foreground notifications if you take Android and foreground notifications.
Were actually there in the ongoing notifications just in the top tray it would come. In in Leben you can swipe them off and if you.
Look at it your ongoing notifications then.
You have a silent notification pane and third. You have a foreground notifications pain in levan. You have this for journal so when you swipe out it will automatically go to the foreground notifications.
Pane be minimized you can always maximize it and see additional data like a full notification but this allows you to be clutter your. Notification tray a lot better so this is just a visual change or where there which has a user behavior just there:
Is nothing that you as a developer will need to do this is something. That users will actually experience in their device.
Package miscibility definitely something that a lot of people have a half hour test for this is primarily. Not a way in which for many versions of Android for longest of time people. Have been figuring out if an app is there or not before calling the ancient of the app so if you're.
Using it say if you want to share something to watch. Sir how do you figure out the whatsapp is there on the device before before calling the intent? You can call the inner shell rate or towards that but how do you check whether it's available of that.
If you if you go and do this do this query on stackoverflow say how do I check for an application. Before watching intent the first thing will come.
Must go use package manager and and check for the package if the package. Name is there in the package manager that will be the classic answer.
That you get but now also that will be what you will! Get now yes that is a valid way of doing things!
But earlier there were no restriction to what packages you can actually go and check if it is there.
So some people would just query all the package. Names and then figure out what the user has on the device do they have any computer apps do they have any of their or from the. Same developer there are other apps things like that now and I read Levin that is getting?
Restricted you will have to do you have two ways of doing things here the restriction is that either. You will have to declare the explicit package name that you're going to query for using a queries element in your manifest.
Or declare the intent for which you are actually querying. Which is you can actually say that you need comm XYZ ABC pack application I will query for this which means the package manager!
Will tell you or this will send your will share result.
Which if you query for that package name if you query for any other package: Name with a direct package name query if you return not as if the package. Never existed on the device but that that is not an indication of the packages there or not!
Is just that you don't since you don't have the permission. The system is not exposing any data to you now there. Are use cases like creating your own share:
Dialog there based on the type of data you need to know what all applications. You can launch in that case you have the option in that case you have the option to actually specify the intent in the queries element. So it will let you query for all the applications with:
That given intent filter and give you a list of those applications. And and you can actually check for and use that information to say build your share dialog and things: Like there are instances in which you want to query all the packages there you have a new permission called:
As query pack all packages or introduced in Android level and that is what you should be using if there is at least reason why you: Need to ask for that function this basically is. Useful this is basically useful when sorry this.
Is basically something that you want to use sparingly because there will be policy implications also on - on this you will hear. About it during your next policy updates right now I don't have the exact details for it but?
Yes you do not use this unnecessarily where your packages is not function that.
Is given for every kind of app this is not information: Is needed for every app so unless you have a very legit reason that you can provide you might not be able to actually. Put get that function now tracking private data one of the things that we've we have seen a lot of apps getting.
Suspended for is unnecessary access of users private data now there are two problems so this one is people.
Have a incorrect understanding of what private data is third and because of that they don't know whether they are actually doing something. Wrong or not in many cases I would have seen with policy violations when you explain to the developer hey this is the data.
You are Onion dentally collecting and sharing the developers like okay I can change that and they immediately make the change. And upload them app backing it but a policy violation one of the things I really. Want you guys to be careful about with policy violations is policy violation.
Also has a history of violation so when then a new violation comes in and potential action is taken by the. Policy team they also look at the history of violations? Of that and that goes and as a signal to decide what sort of an action should be taken?
That is why you would see that the paid deadly.
When people violate policies their accounts get terminated and things like and these. Things are extremely expensive operations they have implications on your business they have implications on your application when account is terminated.
The only thing you can do is go ahead if you only get those that if you have. Basically changed the entire app package name and then we upload it on a different account thereby losing all your user acquisition so far and that becomes very. Very negative for for your business so please ensure:
That policy violations are taken very seriously you have to proactively avoid having violations not reactively quickly. Fix this how quickly you fix the policy violation is not the ish not the thing that people are considering.
Its how many policy violations you are making so coming back to private data access there. Is a new app ops manager a collector class.
Which you can use in order to figure out whether your app or an SDK is access things on private data again you can define.
Different aspects of modules on your app as to kind of easily figure out where is accessing in whoa what! It is accessing and then identify and rectify?
This so this could this is something this is a feature that I'd strongly advise most people to implement in. Their apps because a lot of times not not majority but I've seen far too many instance to my liking where. The developer has never collected any private data but one of the SDK is they introduced into the app actually was doing this and:
They are at got penalized for it now when you actually package. SDKs into your app and publish in Play.
Store the developer policy applies not only to the code that you are writing but it applies. To all the code that you are actually adding in your.
Packet in your application so please be aware that even if you have not written the third-party. SDK you are liable to kind of have you are liable to kind. Of ensure that there is no private data that is getting collected on you and features like this will allow you to audits at all the.
Time so summarizing this there are multiple. Changes that have come in for privacy scope.
Storage one-time permission background location package visibility foreground services all these sort of things ah this page basically where the reason.
I put in is because somebody can go back and refer to this later ah I will not spend more!
Time here these are things that we've already discussed so far with respect to new features one of the things.
That I like most in Android lemon and I feel this is definitely gonna make me testing Android live in a lot more easier. The compared to previous versions of amp right testing your app on Android live and more easier is app compatibility.
Framework basically what this allows you to do is it's a new tool which is only gonna be there in a debug build. Which means only gonna be there and Developer.
Preview this is not going to be there on user device.
Bills which means even in beta as well. As in final release of the app so rather the final release of the not the app sorry are the OS you will not see this feature there.
What this feature allows the devil but to do is to be a Easter.
Turn off a certain restriction that the.
Oasis bringing say examples Cove stores assume one of the problems that we most of us who have tested on our app across multiple versions of Android have. Faced is there might be some there might be a new restriction that is crashing: The app in early in the use user flow which means maybe in the login screen.
Or something without fixing that problem or without writing making a change? To the code you will not be able to test! For test the rest of the app for other violations or other behavior changes now with app compatibility framework:
You will be able to tog each of these changes and then test individually say you can toggle everything: Off and then just turn on scope storage and then test scope storage features.
And its impact throughout the application so it will allow you to isolate.
And test one behavior at a time. Or a combination of features to get a combination of changes together again like I said if your login screen itself is crashing? Because of a change you can turn off that particular behavior and then continue.
On testing for the rest of the app to see where all the app actually is being. Is either crashing or behaving in an unexpected manner and then identify all that and then go back and start fixing this this will greatly: Enable testing to actually proceed faster but like I said you cannot just will not be there in a in a.
Final early so if I use a device has Android level not at they will not be able to change this behavior I'm.
Going to because the setting will setting screens will. Not be even there on the final build of it so this is only gonna? Be there in Developer Preview so please play with us and ensure that your testing happens because.
I would advise that when there is a problem right. You can actually go ahead and target things off.
And to kind of figure out and isolate what is causing the problem also rather. Than go with assumptions so this will help you build identify the problem or identify the change.
That you need to make or the change that is causing: The difference in behavior thereby creating a solution.
Which is much better for you and fresh leads now we know that there are multiple.
Devices which have multiple refresh rates on the device so what we usually see is higher refresh rates sharper screen things of that nature. But what you need to understand is supporting multiple refresh rates actually makes. A lot of difference in error in in how applications!
Run on a device because some apps for instance games for example so when let me say 60 Hertz and 90 Hertz. Is supported by the screen it means a multiple of this is.
Also kinda odd you can also drop it down to 45 Hertz and 30 Hertz the screen. This refresh can be done in that way say assume that your game has a very very intense computation if you're running! At 60 Hertz you get 16 milliseconds to kind of cram the computation.
And if you don't do it in 16 milliseconds or in the background you will start missing? Frames now in order to avoid that you might.
You can actually tell the device to now change. To a lower refresh rate so that you get a larger window to do your calculation so things like that? Can be done so from an SDK as well as from NBK you have the option to kind of suggest a refresh.
Rate to the device and run it at that refresh rate to ensure that users have a smooth experience on the screen go sometimes with. Certain calculations and certain operations you cannot run the higher refresh rate or the maximum refresh rate and if and can't finish! The computation within the time frame where the choreographer will.
Not stop skipping the frames so you want to be doing this again. You can be also conscious about battery consumption with this with. A higher refresh rate there's a slightly.
Higher battery consumption and you want to kind.
Of cut if you wanna kind of control it with your application to a certain extent. Yes you can actually manipulate these things so there is a very nice article of how refresh rates will affect applications.
This is not just a gimmick given by what is a OMS to sell their device this has implications of matter! How battery gets consumed how much time your app can actually get for computation between frame frame refreshes the like that which you as a developer?
Can take advantage of so please do read up on why that refresh rate matters and then how you can and decide. How you can manipulate this tree or a partition way to the next one yeah resume on reboot okay one of the things that we you.
Guys might have seen is then you actually. Run an OTA installation you have to log into the application. For the West or not os/2 kind of moot completely now with Android level the whole idea is to make OTS come over the night where!
The device is actually connected to power and then it is Wi-Fi which is the most favorable. Condition for doing and on on the air update you want to be able to do the update restart the device:
Without user much of without any user interaction? And be able to an - will be able to function normally after OTA reboot rather. Than going to a restricted mode if you if you take a say Android 9 device and set it to do an OTA update you will see that unless you.
Logged in all your applications cannot run normally because it has to complete the boot process.
After the user has logged into the device basically. By providing is a hopping this is a limitation that we are removing in using the feature?
Called resume on Twingo in android live in the OTA updates. Are gonna be much much smoother they can happen. With and complete and then apps can run functionally complete can run normally without sort of can normal run normally:
After the OTA put so this will a this this is something that is? A user facing thing you really don't have to make any changes in your application to take advantage of this but this is something. That makes the voice perform better towards!
The users use case there is Phi G state API this has multi new abs called as magnetic a bandwidth. Estimator as a Phi G dynamometer des API there are multiple things. That have coming for if you are making:
An app which is only shipped in a region like India then we're Phi Z hardware is there but we also Phi Z network available you really!
Can't take advantage of these ApS so if you have a global app where.
Say you have a lot of users!
In the US there they have Phi J networks available o then or your user apps I used in Japan. Where this Phi Z network available you want to kind of take advantage of this and ensure that you improve the users experience taking! Advantage of these two API so this is also very nice use case where there is call screening improvement.
So if you have a dialer app sort of a thing there are improvements in call screening.
The apps can to put rejection reasons and things: Like that to the system so this is very niche if you're not really doing a dialer app you might not really? Want to kind of look at this change!
Why does itah me I really like this one this has made my desktop a lot more cleaner and this basically! I have seen this come before as a plug-in or something by a third party but this that for me personally. When I tried working with that it did not give me a lot of success but with this baked into the u.s. the wireless.
Adv function allows you to like communicate do ad the operations install an application debug it all these things. Without having a device connected why a wire it can if your computer. As well as your device and debuggable.
Devices on the same network your your adb will actually list it as one of the devices you can interact. With so you can actually push information get get all the logcat and things like now without actually having the wire sale a lot. Of times you really have to pull out a wire connected you might be error like airport is one place where i've?
Done this a million times but where I have an R to kill so I would take out my laptop.
Then connect my phone with the cable and then there's no place to keep the phone and I use a short cable for really?
Short one something like this is what I use which is like really short for debugging and. Then it becomes really tricky so I have to keep my phone on the desk this is and there's that.
That makes it a lot to ki so every time the. Phone comes my screen starts flickering him yeah it creates both trouble then I I really. Wanted to order but the wireless LED again kind of keep my phones away anywhere within the vicinity and start working.
With it it it would work I have not tested this on a corporate sort of a network where there! Are multiple devices but on my home network this works beautifully. Beautifully and this one was something that you can you can use straight off and there.
Are some changes in terms of the network security part of it with respect to this in level and screen recording when? It comes there is a few changes that few changes. That have been done because we've basically this usability changes in if I would consider it when you're actually screen.
Recording and appliquéd scaler recording what the screen. Recording about the two most common use case is recording: Audio or showing touches on the screen earlier user would have to not go to the settings to do this and come back now this.
Is gonna be there on the notification panel itself so you can always. Toggle the record audio or short touches on the screen because most times when users want to record how an application. Is performing like a test was gonna send the developer for the hack that is happening they would actually!
Record the screen and then realize that they. Are not showing the touches so then they go to settings have a toggle this. Come back and then run the flow this that sort of setting can be very easily eliminated again if the screen is being!
Recorded from a user's perspective the notification. Actually is red in color which gives serviceability that something.
Is recording and users don't skip that fact skip the skip the fact that.
The recording is continuing so that also gives. A user a lot of cue that there is there are there were three buttons in notification which is already removed. And now these totals are there which is a much better UI to work.
With notification hairsprays another thing that we have added the UI that you see here is not the final one there might be changes to this.
You might already Changez I've picked it? Up from a new book review one but the whole idea is that.
You should dismiss a notification which I have done many times I go and clear my note figures. And clear all then I realize there:
Were few notifications which had coupon codes:
For something which I can't see later and I miss out on that so things like.
That all happen so in eleven you can actually.
Turn on notification history and then from the notification shade you can go into the history and see: What what you have dismissed what all notifications.
You received all the device like I said there are changes that might happen to this you have to turn.
It if you want to try it out and you're running Android lemon you've got to go and turn it. On in your head on from notification extraneous settings and only this is not Auto turned. On but this is a quite a useful user feature one of the other things which is more serious from a technical.
Perspective is the use of non-approved sdk apx so if you take! Android for instance there's a set of API is that are available or many of them are private API is SDKs and apps have some. Of the apps have we've seen that.
Many of them have been misusing the you misusing the private API is to kind of get certain! Behavior now because of that a few releases few versions:
Of Android before we actually have this classification of why it is grey lists and black lists and like grey and grey leave.
It but you can have to be a great list in black white white black and gray so basically white is like an and loud. List a blacklist is a disallow list and grey list is something that will allow temporally that is what you should think about it anything:
That is in the allows list with something that you can go and use in your application and can be and! Not be worried about if the behavior will change or this will be deprecated. Later because if there is any change to it we will communicate it to you after but anything that is in the:
Disallow list which are private API is you will you will see that those things can change at any point of time Williams? Do not have to have the same: Behavior for those so you might see on pixel a certain behavior for Anna but you might say completely different behavior.
Or that APA not even being there. On or a different OEM device so anything in a disallow list:
Do not use them gray list is something like a temporary? Allowed list which means in the next version this is something that you shouldn't be using but for the time being. If you use people keep warning you in your logcat but we will continue to we will not say stop you from getting.
That operation completed say into something like you're picking a census later using a particular.
API or if it is in white list you will get that sensor. Data if it is in disallow list or the black list you will not get that data it will always return nothing and if it is in the. Gray list you will get it for the time being but there's.
No guarantee in the next version you will get it so what you got to think. About is that those are ApS that you need to change or avoid using if you have getting and non if you go to strict. Mode and if you run strict more you will actually be able to identify all the disallow DAPs that you are using?
Gray as well as a black list you see what. All you need to change the other place.
You can go and check us if you have chlorine app to play store.
You will have the pre-launch report now actually will show you the list of ApS that you need. To change either stop using or find an alternative one which isn't which is in the public.
SDK PS so pleased ensure that this. Is something that you take care because every version of the OS what we're doing!
Is we have make moving more things from grey list into the black list so more things which.
Are temporary allowed are disallowed in that or that version because: Without a single code change your app will run your app will run without sorry without any code change? Your app will stop working when they are running on a different?
Worst version and that is what that is a behavior that you don't want to have so ensure? That these things are taken care of now itself the process termination.
Status is any ring buffer within the app we're sorry. Within the West where app can go ahead: And request information of white exited last time this is particularly useful when so what happens when the rapid is on the device it actually writes.
Some information into this app exit info ring buffer so the next time the app launches or you relaunch app to find. Out never you can actually go and fetch that data from the ring from the buffer and then use that information to debug. This is particularly useful when you want to kind of understand why a certain crash happened on the device sometimes.
Your crash reporting tools do not share inner ynr happening and things are or why a crash really. Happened this one will give you additional data around it and this is something definitely it should be there in your bills for but you work only! On Android dinner so going further have this so that!
Your apps you have more understanding of what is happening now phone permissions again there is fine grain or phone permissions. Now if you look at phone permissions they are considered to be dangerous permissions now reading full state is different:
From reading phone numbers in a previous version: All this was considered into one group so really. If you just wanted to read phone numbers or you just wanted to read for state:
You would still have to I mean the permission was read phone state and you will get all these things together.
Now they've separated into two different Commission buckets? And read phone numbers is something that.
Is only that is more like a privileged one only certain apps will action which actually has the requirement for that information we get. It so you want to leave the city use cases very you are using this particular function calls and try and getting.
Beta force maybe in a different part of your algorithm so you want to verify sure this does not get this permission. Is either you add this permission or every visit the reason why you need this information in the first place and lastly there: Is conversations API where you can actually pin a particular user as more important say?
You couldn't in my case my my family members I put them as important. Which means that if I get a!
Message from my wife or my mom even if my phone is in a no disturb mode it will. Actually show up that information but the bubble will be there by default. So having a user get I mean giving not an app the priority but particularly identities.
Within an app is something that is allowed so people and conversations are becoming more important they will be bubbled. Up higher than other notifications from the same so this makes it much more easy to figure out important messages and important information and and certain. Conversations say we have a hundreds of watts have groups if most people have like tens of whatsapp groups in getting.
If you give whatsapp an active permission which is like something that can be every one of them will keep disturbing!
You can actually take particular people and make them important and rest of them all can be silent?
If you go into a donor disturb mode and your boss sends your message you're. Not going to miss it the next time most / wife sends you!
A message you do not wanna miss the next time so I mean yeah bad joke if some of you might not relate to it but.
Yeah anyway yeah so but that's that's kind of a very useful feature for most people. I've been using this and I see that I don't get disturbed? As much because I can make all the others the less important conversations like the groups.
Group chats you are in to go completely cells the APIs Island only certain.
People are certain conversations within that app becomes more important and they they get self a step better? For you and wrapping up this is not a comprehensive list by any order there are multiple things which? Are there like the media state or the battery batteries optimization.
Part screenshots adjust the settings you can now have different sensitivity for different actions when I swear right swipe and things.
Like that and this whole there are lot more features. So I've only called her things which we see has quite useful for a lot of people and might impact people?
But based on use cases please do read the documentation and understand what all features are there and what all. Features might affect you I like I said I haven't covered everything over the interest of time: This is the max that I could cover within the time given to me I'm still over by four five minutes.
But I hope this was a useful session for! You guys to give you an idea of of the most most impactful features for most developers out there generally most of these apps most.
Of the apps will you have will be impacted by a combination. Of these aps but again like I said there are more features there are more more.
UI changes that are part of the OS that you will.
Have to understand so please do read the documentation and find and find the gaps.
And update your apps accordingly lastly rehydrating we are still in the beta phase right now which means a lot? Of stability that is getting added to the US it's a good time to start change making changes: To your app and I try to flee start releasing you to the list into the real world I'm seeing!
How people are reacting to it see if there are any bugs that are coming in your algorithms or if there! Are any ones in the implementation that you'll see and by the time the final release is out there your apps. Are working as good as they are working on any other!
Version of the platform that's it from me thank you for a patient.
Listening and that is my twitter handle so if there are more. Questions feel free to ask me on that or not my twitter.
Handle am Sanji i usually post stuff about android most of the time the lockdown has made me post a few personal things out there.
But then still that's just cabin fever in my opinion but please feel. Free to ask me questions and I say fastest way to reach me so if you write.
Something there most probably get a response very soon thanks. For a bration listening stay safe everyone thanks so much I'm on it sir thank you thanks? For the opportunity okay you have a nice day cool I'll be taking questions or is it.
More like you wanna take questions can probably unmute yourself ask ya everything to be answered: I'll try and share as much of information that I know but if there is anything that I couldn't please.
Post on the Twitter channel again and I will? Find an answer on a small party of Lee thank you so much thanks for finally speaking it Matt you know it's it's because every time. Fire so somebody asked me why the not in town or that we can have another event exactly!
Yeah the the whole amount of travel has reduced from me it is in nine years this is the longest. I've stayed at home that is the it is a good thing the only good thing about this long me at least having good yeah. I'm just trying to see the bright side that's all just desperately trying?
To see the bright side of things cool if there are questions please if they weren't anything that you want to ascribe please put another. Child Twitter and I will try and finances way okay we have about three or four minutes before obsession. So so other questions coming on our chat from asked about media controller some information about the media controller:
So yeah with a media control and now what are the changes that you see is that you will actually.
Have on the notification tray media controls it's not like? You are having a notification with media control you it a part of the earth settings like. A quick setting straight sort of a section you might have seen a picture of it let me see.
If I can go back to it if you see the first picture right you will see your current playing controls.
Of a player right there so you just. Have to enable that feature and it'll actually come in there it will it is like a carousel.
Where the last three ones are the switch swipeable and the last three ones and it's there for a certain amount of time I believe. It's this is there as long as the session is active but that was not finalized. The last time I actually requested for additional information that data wasn't finalized.
Yet I did have to see what is the behavior on beta 3 and then maybe play back to you on that one so in beta. 2 and AMD dead that media controller right now is in the notification panel so let's just say if you open you to music as you can see in this. Screenshot it is currently me notification section but now it's separate and now I bring it these things.
Actually change between Developer Preview and beta because we get a lot of feedback from developers. On what is working why some things will not work see as like any other team we take a set of user research.
And go ahead with that data but when we put features out there in the real world during Developer Preview.
We get a lot of input from external developers which sometimes make us change things. Back so sometimes we revert changes or we might bring changes introduce changes into the into?
The aim introduce changes from what we have released!
Out there so those things are like I said in VP was not finalized I last time I checked. For more details about it was during Developer? Preview and this was the behavior then I really have to double check on this or on what is the final thing yet because even with:
Beta some things can change as long as not developer facing things like this which is more of a year system! UI sort of a thing things can change even during the beta phase it is unlikely but things sometimes do change depending on depending on how much! Feedback we get and how well that feedback:
Is so let me let me try.
And answer it by taking a check again I will move to the next question as per the new privacy.
Policy regarding background location what kind of app use cases what a use case will be allowed to use access background location. It is not very different from as long as you're? Declaring the background location and it's enough oh if you are actually getting that in the background like using a foreground service to kind.
Of get it the the it remains very similar?
I can share the documentation for it for you to kind of take.
A look at that completely not sure I understand your question completely but I share the documentation on the chat are your Twitter DM s open. I think it is I have I do not remember changing that yeah if there's anything?
But a glove please feel free to write I believe! It is open as you mentioned or their scope storage tab we use a fosco for complete access to the storage: We use for the apps like file manager and all those:
We need a Google Play policy something. Like this so four means like the further debug build we have to access this place?
Your policy and suppose we don't want to learn! Tap on the Play Store and we just want to use it as an open source project.
Then we have to use this play policy in that thing if it is if it is an open source. Project so we are actually controlling it as a distribution mechanism the OS is capable of granting you this I mean like. The users wave of granting us permission but we are from a distribution perspective we are actually.
Controlling it so it's a policy that controls a usage of permission from a pure technical perspective there is a new permission that is added. To the OS it works like any other permission but when you distribute it through!
Google Play a policy will be applied in such a way that only a switch have a legit use case will be allowed to have.
Allowed to be distributed in play which. Access this permission so if the open source project and the or distribution is not through.
Play you shouldn't have a problem technically it will work like any other permission it lasts the user to give the permission. The user gives it will continue thank you question of length average twitter handles on the screen! Thank you so much again a minute why is my pleasure thank you in Bombay sometime soon trying to see the sky outside.
Cool guys have a good time okay so we are gonna start our next session today so so I'm very excited. About all of the changes that are happening in Android. 11 privacy to be particular and to talk more about that we have sort of Aurora:
With us he is a Google developer. Expert for Android and he's raised in Singapore he works at wiki where he leads the Android engineering.
Team apart from Android sorrow is a fitness fan so if you are having difficulty maintaining.
That shape in this lockdown he is the guy to go to today he'll talk about changes in Android. Level so let's get started syrup all over to you hey thanks for tuning in on like a Saturday. It's late Saturday afternoon okay today I'll be talking mostly about what's new in privacy changes in Android the last talk did cover a bunch:
Of privacy stuff but we'll try to dive deep into what these changes are how you could go about preparing.
Your apps for these changes and what the future of Android would: Be when it comes to privacy alright so ok so over the last couple.
Of Android releases there's been quite a lot of focus on privacy okay and these changes are important to protect users!
Data and let them know what is happening with the data basically so as you saw in Android. N and even in Android 9 there was not changes introduced like foreground services were introduced location. Permissions sort of your TV screen is not visible.
Oh wait let me try that again and no webcam is when we can see you on the webcam yeah it sees me screen sharing? His on let me turn it off and on again do you see it now yeah we can see it. Oh the same thing let me think then let me just go back.
Here okay okay sorry about that guest okay yeah so I was talking about young privacy changes in Android so in Android. 10 there were a lot lot more of focus on making. Locking down the platform and making it more secure.
Basically giving back access to users to their personal data. And you know as you use smartphones these days there's a lot of private and sensitive information. About or the phones about you and smart phones contain a lot of information about.
Our lives so it's really important that as a user the user has trust in the. Ecosystem in the platform and in the apps they're using that nobody is actually abusing the data? Access that they're getting so with every release.
Android is making a lot more of effort to make it more of a privacy centered platform so nandroid 11 brings takes:
This privacy focus changes to the to the next level what we have is we have changes in permissions. We have new foreground services types we also have scope scope scope storage which is no longer optional. And like the case was in under 10 you have a few changes on package visibility and a really cool new feature.
About data access auditing so first let's look at what permission changes have been introduced. So in Android 10 when users were given the option to select and say the location permission when there.
Was an option to say oh only: Allow the access while the app is in use what turns out to be the case is users are very very highly likely to choose this scenario.
In fact like about half of the time the users actually chose the scenario where. It's just give granting you access when the app is being used in the foreground so based on this feedback.
I would assume the team went ahead and provided users with! More granular control over their private data especially the microphone and the camera permissions so in along with the auction where you have that Oh grant. This permission only while I'm using the app the users will now see a snoo option in the dialog which will say grant!
This one-time temporary permission for this app and as I mention in the talk this one-time permission? Is actually only till the app is in the foreground and for a few a month.
For a few seconds or a minute when you leave the app and the app goes to the background but after. That this permission is just you booked for the user simply because this was just. A one-time permission and this now is not just for location.
It also extends to the microphone so let's say there's a transport app you know and it offers. A VoIP feature to actually contact set up a communication channel?
Between your driver and the rider so for this such kind of an app it needs!
To make voice calls so the user can choose!
To just did I just allow permission just one time let's say like now the users decided to communicate with this driver over the corn instead of using:
The regular text messaging mechanism that the user or that the trainer might be used to using so this scenario. The rider could be like oh I wanna call this one time and that's it I don't foresee myself calling every other driver.
So I don't want to give you permanent access to this my microphone! I just want to do it one time so this is where this one time feature comes into play similarly for camera. Access like let's say your VoIP feature also allows video calls it's it's the same process.
The user could say allow one time and here I would like to also point that. This allow one time option is actually.
Only for location camera and microphone others. Dangerous permissions for which you need to prompt the user for permission grant this will continue to have the two standard options of allowing.
Tonight there is no concept of allow one time or only allow it the photograph. All right so as developers we are wondering okay now there's this new option in the prompt. Which is allow one time so how does this really affect us like what do developers actually.
Really need to do to adapt to these new changes.
Actually nothing like if you're if your apps are currently following the best practices then you actually really don't need to do anything.
To get get it up and running because even in the previous world without one-time permissions the users could actually go to system.
Settings and be like hey revoke the permission for this app so app developers always had to be prepared. And live with this reality that the permissions could be given to them and they could be revoked any time they any time the user feels like.
It so what are these best practices like I go through a quick run-through about: What these best practices look like so basically whenever you.
Need to access anything which is a dangerous permission you should check that permission is granted to you or not and it's important to check. If that permission is granted and not keep a cache of that permission because the user could go ahead and deny that. So these permissions can always get in get out of sync if you're.
Caching them so every time you have to use a certain feature? Or access certain private data which is gated behind a permission.
You should always check for it if the permission is granted go ahead and do perform the operation.
That you're looking to perform but if that permission is denied!
Then the system would send your call back later letting you know that a either the fucked user doesn't have this permission. Uh either your app doesn't have this permission or be you need to show a request rationale to the user where? You actually give them more information about the context of why you need this permission so you go ahead request for this permission.
And if the user denies it just make sure to fallback grace gracefully explain to the user that this current functionality isn't supported because. The user currently just chose not to give. You this permission so you even if you have this flow in place one-time permission is seamless.
It just works exactly the same way the first. Time the user opens the app you grant them the permission so the user grants you.
The permission then then the user opens the app second time because you're checking for the permission! Again in a and you are not assuming.
That just because you were given the permission last time the permission is still available if you take out that.
Assumption of a one-time permissions would just work seamlessly for you and given the fact that these best practices existed. Earlier and apps were expected to follow this if you're following this one-time permissions work and given that assumption. Your one-time permission appliqu the prompt for the user as an option to select.
One-time permission that will appear in any app that's. Running on android 11 even if you haven't really updated your target SDK level to say yes I target android 11 irrespective of that.
Fact one-time permission as an option will be presented to the user starting with Android 11 so even if you are not yet ready? To support hundred eleven I would say let's let's try to strive to adopt best practices so that: Geeze such changes require minimal developer effort honest I all right okay so that was about one-time!
Permissions and now let's look at location permission in general like location permission is very special in the sense like in previously? Even in Android 10 location permission was split into two types of access there was a foreground access and then there was a background access and. Android 11 actually now encourages have to really really adopt this practice and what I mean with this is now Android 11 establishes this incremental request.
Permission for the user that's first you're supposed to request a foreground access: And once the once you've been granted foreground access to the app you can go ahead and request for.
Background access so let's see what this looks in looks looks like poor foreground access. Nothing really changes you continue to request for the user you the user will get their standard? Crown which is allowable using the app allow one time which is a new thing or just deny now let's say the user gives you a now while.
Using the app permission and now you're an app which needs background location? Access let's say you're a geofencing app or an average really needs to know that the. User is leaving this location so you're a smart control.
One of the smart home apps so you really need to trigger some some actions for the user based on their location movements!
So you really need background permission so once you granted foreground. Access you can go ahead and request. For background location and in background location once you've run a ask for background location the user will no longer get and in a prompt the?
Inner prompt has been taken away and what users get is that they get a system dialog!
Which asks the user that hey do you want to actually navigate to a that you really want to grab this app a permission.
The background location permission and the user says so the user is actually taken to the system settings?
Where the user now has the option to actually grant.
You a permission for allow all the time and do note. That at this point the user can still choose to deny that permission to you so it could be a scenario where:
The user granted you foreground access then you prompt it from background location which took this user to the system settings screen: And over there the deny option still exists and the user could. Choose denying and then when you come back to the.
ER app you would have lost even foreground access so again the best privacy factor the best permission practice still. Tells you that anytime you want to access any dangerous permission related user data always always check that if that permission is actually granted? To you or not all right and since.
This background location flow when you are taken to the system settings is something that would occur only if you if you update your target. SDK level there is a backwards compatibility option built in right into Android.
11 where if there's an app which targets Android 10 and below they are still allowed to request for foreground and background permission in one go even. If you are not following the incremental process in that scenario. The system will still not Allah give present uses the:
Option to do allow all time right. Inside the app instead there'll be a slightly different. Dialogue and that dialog will actually have an option for the user to go ahead.
And go to the system settings the same way like it is for. Apps that target Android 11 then they can go to the system settings.
Grab this permission and your app will then be allowed to operate in the background. All right okay next up given that we've covered let's stay on permissions there's? Also auto reset permissions so or look at Auto reset permissions as being very similar to user going to system settings.
Going to your app and then revoking certain permissions for you this works exactly:
The same way let's just say it's now automatic and what this does is if a user has an app installed and the user. Really forgot about it and the app was granted some one of the dangerous permissions the the system would. See hey the app has not been used for several months and the system will:
Automatically had when I looked at this was what does it really. Mean by when you say the app has not been used by the user like let's say what. If it's a background app what if it's.
A what if I'm accessing location permissions from. A foreground service like does that count as user interaction unfortunately no foreground interaction only and only applies user actually. Opening your app and using it even if you send out notifications to the user and user.
Interacts with those notifications this is not counted unless of course the interaction with the notification actually: Resulted in the app opening then it's a foreground.
Access of your but if the interaction with notification. Was something which did not actually open your app let's say it was a button and which triggered some.
Service in your app and you perform some action for the user that does not count as foreground interaction with the. App so in that scenario the system would count your app is not being used and the counter or the time the timer for when. The auto reset permission kicks in will continue to take place again important to highlight here that.
This feature also only kicks into place. If you update your target API level to Android 11 or our if you are. If the users are running apps which are not yet ready for talk to target Android.
11 but they're nodding it on and 11 devices the system is not auto reset permissions for them currently! All right and whenever the system decides to auto.
Reset a permission for the user the system will present the use of this a dialog. To let them know that hey we have revoked. Certain permissions for this app for you and the user can go in and choose to reground the permission of the user fields necessary or you know.
Maybe go ahead and install the app because either. The user realizes hey don't use this app for 2 or 3 months and I don't really need it anymore here you might. Be wondering hey what if I have an app which primarily just?
Works in a background you know it allows it's a smart device connectivity app so it senses your movements. And patterns it just works in the background to switch on and off your gadgets for UI it's something which is constantly syncing users: Data to the cloud or providing family safety features like what about me egg I am NOT an average primarily?
Work focuses on the foreground in this scenario Android still offers you a way to actually inform.
The user that they can go to the system! Settings and actually disable the auto reset permissions.
For your app so you can use you can invoke an intent with the annual. With the settings action application detail settings so this will take.
The user to the system settings page of your app where they will be presented with a auto reset prom just like I've shown? Earlier like this chrome would come up and the user can choose to toggle this off if you've educated.
The user and the users aware that hey this app is just working in the background. I should not really reset the permissions?
For them for this or I should not I should tell the system to not reset permissions for this app so this is still possible if you.
Are an app which works primarily in the background but for most common scenarios and for most apps this should not necessarily. Be needed and as long as permissions best practices are followed this is another feature. Which should not require any developer effort.
As long as you're an app which does not work in the background! Alright so now that we've talked about permissions let's look at a bunch of new foreground?
Service types and values that were added in hundred eleven in Android ten actually had introduced: Firstly the concept of row called service types and what in Android tended the idea was that apps can declare their intentions to access!
This foreground service like it was just saying that it was not compulsory.
For you to say that hey this is the type of data that I'll be accessing. In the foreground using a foreground service it was just in color for the app to actually do so to be good:
Citizens and inform users through the notification that this is the kind.
Of permission so this is the kind of private data that I am accessing it are by running as a foreground: Service but in 110 two things were still compulsory like your foreground service.
Will not get that data if you did not declare it that you'll be accessing that data this was about media? Projection apps such as Android auto gluto TV or other device or other services that were monitoring connections.
And definitely location so if you had a foreground service which did not declare its foreground service: Type as location the service will not get access to location so now in Android 10 we have a couple!
Of more which are enforced one first up we have the camera now this will be enforced!
So if you have a foreground service which tries to access any simulator: To the camera and it's not declaring! Its intention to do so it will be denied access to the camera if this does not just need to be the camera preview?
Like if you're setting up the camera if you're doing a Bob start to make sure that when the user actually needs to use the camera. You're ready to provide an instant access.
To it your service still needs to say then hey I'm a foreground service type. Of camera and I will be accessing camera location camera details else the system will not allow you to access. And similarly as if we were used to doing for location you could just go ahead and say mine this is my service this.
Is the foreground service type and say camera and along with camera. Microphone also is a new foreground service: Type and it's the same concept as location camera that we just discussed that if you're.
Saying that I want to access microphone and if you try to access microphone: Information without declaring it you would not get any information. And now foreground services allow you to define multiple types in the same field so you can have one service?
Which accesses multiple type of information just. That you need to be upfront and declare it to the user all right yeah so just a quick simple. Recap mostly for permissions and for foreground service types the biggest changes that will affect?
Developers and users would be camera and microphone along with location which was already enforced and being! Clamped down in Android day ok so that was about permissions?
And how we access user data now let's see package visibility so what what package. Visibility really means is six previously before. Android xi what users could do is they could what developers.
Could do essentially is we could check what are the packages. That are installed in the app you could query a list of all the packages like you had sometimes!
Some apps were using that kind of information to build custom change share sheets so to show to the user what. Apps are installed and where they can share the content so this was the use cases where.
You would access all kind of packages installed now Android it 11 tries to rein that in so that every develop. Is a good citizen we should let users know. That hey you know we'll be checking what apps do you have currently.
Installing and this is what uses whatever you do so as a developer you would. Do package manager and you would be like hey tell me a list of installed.
Apps and earlier this will return you the list of all installed apps at the out of the. Device and you would use that too as I said create share sheets. Or any other kind of information that you would want to present to the user so you were.
Actually looking to query the package manager and then interact. With these kind of information what you would get. And you know share sheet is not just the only example then a bunch of other.
Use case scenarios in which developers would want to access! What packages are installed and even though we are saying package visibility is now restricted a lot of common flows don't really change. So if you're using some of these.
Common flows which we shall try to go through now you should really worry. About that this will impact your app so what common! Cases are we talking about like let's say if you wanted to get information about your own app right.
This is a change you can still get it if you are trying to get access. To a list of all packages it's not this API is gone for you it's just now it's restricting.
Its returning less content for you so a call to package manager get installed packages would now no longer return you all apps but. It will still return you your current calling app it will return. You system packages that are installed by default packages that implement corn Android functionality such as the calorie messaging.