Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Working with android 11 especially in Privacy(GDG)

Working with android 11 especially in Privacy(GDG)

- Android 11 Meetups

Nyi Nyi Zaw

August 09, 2020
Tweet

More Decks by Nyi Nyi Zaw

Other Decks in Technology

Transcript

  1. Background Location • The background location will get more restrictive.

    • In the previous release, we used to be able to request for foreground and background location permissions at the same time. Now, we have to ask them separately. • If the foreground permission is granted then you can take one step further to ask for background location. • Just like in the previous release, for location, if we need a location in a foreground service, we need to declare in the manifest. • Now that capability has been extended to camera and microphone in Android 11.
  2. One-time permissions • In Android 11 a new option is

    being added which will grant permission for only the current session. This means that if access is required again at another time, then the permission will need to be requested again. • if you are running a foreground service since granting the permission and the user leaves/returns to the app before the foreground service has finished, then the granted permission will remain accessible.
  3. Denying permissions • Currently in Android we can display permissions

    dialogs to users when we want to access media, location and so on. • These dialogs are a great way to protect users from unwanted access to certain content / activities on their device.
  4. Background location permission • When targeting Android 11, applications will

    no longer have the ability to request access to location data all of the time from within your application — this option has been removed from the in-app permissions dialog. If an application wants permission to access the users location all the time when in the background, the permission will need to be granted from within the system settings screen for your application. • When it comes to accounting for this change, there are a few steps that need to take place. We need to begin by adding the ACCESS_BACKGROUND_LOCATION and either the ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permissions to our manifest file.
  5. • Whilst these may seem like a big change for

    developers, they will make our users experience feel both safer and more pleasant. • If handled correctly within our applications we shouldn’t see a negative impact in the user experience. • Remember, only request permissions as they are needed (along with if they are needed) and give enough context as to why that permission is needed.
  6. Developing for Android 11 with Android Emulator • In the

    past, we’ve released features like the Location and Battery extended controls, both of which allow you to quickly test scenarios that would cause headaches on a physical device. • The Location controls allow you to test your app’s reaction to movement along a route from the comfort of your desk, and the Battery controls allow you to test the impact of things like charge level state without having to wait for your physical device’s battery to run down.
  7. Conclusion The new Android Emulator foldable and 5G features are

    two examples of how the Android Emulator complements physical devices, and we hope that they help turn your app up to Android 11.
  8. Thanks References : 11 Weeks of Android: Privacy and Security,

    Permission Changes by Joe Birch (Medium), Developing for Android 11 with the Android Emulator