With the Arrival of Android 11, Google Changes the Way Of
Total Page:16
File Type:pdf, Size:1020Kb
With the arrival of Android 11, Google changes the way of accessing the external area of data known as "external storage", with the new runtime these changes were implemented that everyone must follow. These privacy changes can be found at this link: https://developer.android.com/about/versions/11/privacy/storage which will provide a better explanation about these changes. For this, Google to allow the applications/games that used the outside area to save data the possibility of moving the important data to the allowed data area or to the new data structure that emulates the different external folders created the mode of "RequestLegacyMode" and for this, the developer must use API 29 in Build and Target in addition to checking "Legacy request Permissions" which is located inside the properties of Android, so the version that is built will have this permission and with the permissions of EXTERNAL_READ and EXTERNAL_WRITE will allow to continue reading and writing in the external area. It is important to remember that this mode only works on Android 10 and is automatically disabled on Android 11 devices, this mode should only be used for a short time in case it is necessary and then follows the policy of Google and Android that indicates that new applications must be built with API 30 and target 30. To save data to the internal area with the new folder structure a new expression inside the Android object called "Public Scoped Storage Directory" will allow to pull the specific folder that corresponds to the application/game. Developers are encouraged to read more about the policies implemented by Android latest date May/Aug 2021, more information here: https://developer.android.com/distribute/play-policies Additionally, in this new version, new permissions were incorporated, one to gain full access to External Storage and another to read the EXIF data embedded in the photos, within them the orientation of the photo necessary for the Android Camera Active Picture objects. in order to display the images in the correct orientation. 1.- MANAGE_EXTENAL_STORAGE, certain applications need to access all the content of the external area for them this permission was created by Google and is available from API 30 android 11+ for this the developer must comply with the regulations dictated by Google regarding get full access, more information: https://support.google.com/googleplay/android-developer/answer/10467955 This function is available at runtime through the Android object, the developer has a new action to request storage permission through action and a simple condition to verify if it was granted, the most important thing about this permission is It is only established once and by the user's hand when he turns it on in the settings. Here you may find the above example https://drive.google.com/file/d/1KCR7DdnzdTOZWkVppcyDmyN8Rry-zm1K/view?usp=sharing 2.- ACCESS_MEDIA_LOCATION, as mentioned in previous lines, this permission guarantees that the EXIF data within a photograph (location, orientation, and camera data) can be accessed, in the case of Fusion the necessary data is the orientation of the image to be able to display the image correctly. Remember that this permission is used for 11+ devices. What does the new application must ideally comply with? With the new concept for privacy implemented by Google Android, developers must conceptualize their data to reside in data internal (DataStorage) or using the Public Scoped Directories available from Android 11. For this developer doesn’t need to set any permission for any Android version. For Old developments, that only use data storage the same concept applies, no permission is needed and no modification. On the contrary, developers that save data in the external area still can do it but these files must be images, text, and HTML, other extensions like .arr or .ini are not recognized by the OS. There are users where their application saves images using a camera or by making a screenshot this is functional and was tested (see example below). In Android Object, users can now check if a permission is granted denied or blocked to react in their code according to this. Here you may find an example for this https://drive.google.com/file/d/1k4zUZhAy4C70EPpcFH1kzxM-69u10PS4/view?usp=sharing Android 11+: Storage scoped application: Access to external storage directories is limited to a specific application directory and specific types of media that the application has created. Automatic Permission Reset: If users haven't interacted with an app for a few months, the system automatically resets the app's confidential permissions. .