Android is committed to helping users take full advantage of the latest innovations, while always making their security and privacy a top priority. In Android 12, the platform has increased transparency with the introduction of the Privacy Dashboard, which gives users a simple and clear timeline of app access to location, microphone and camera over the past 24 hours. Users can know exactly when permission access has occurred and can choose to revoke application access to specific functions.

The impact of privacy information centers on developers

Now that it’s easier for users to see what permissions apps on their devices are using, all developers should review their code, clarify their data access requirements, including those for third-party SDKS, and ensure that all data access has a verifiable application scenario. You can use the Data access audit API to track the data your application uses, and the new Permission intent API in Android 12 can explain to users in more detail the context in which your application accesses the data.

Data access audit API

Android provides a data access audit API to make it easier to track data access scenarios in your application. Through this API, you can associate access to private data with specific application scenarios, such as “ordering coffee” or “sharing with friends.” It allows you to track both expected and expected data access. . You can also use in the application of AppOpsManager OnOpNotedCallback, each time you apply or rely on the library code, when access to private data, can be dealt with through callback to make some of them.

For more information about the data access audit API, see:

  • The document
  • The sample

Access Intent

When you do want to request a permission, you can use the Permission Intent API to explain to the user why you want to access location, camera, or microphone information. You can display the reason for data access in the Privacy Information Center or on the application’s permission Request page. For example, if your application has two functions that require access to the camera, such as scanning bar codes and taking pictures of food, using the Intent API, you can declare the use scenario for each request for access to the camera in the Privacy Information center.

To display the Intent in the privacy information center, you need to define an Activity in the application, The Activity needs to be configured with an android. Intent. Action. VIEW_PERMISSION_USAGE_FOR_PERIOD the intent of the Filter, You also need to configure the android.permission.START_VIEW_PERMISSION_USAGE permission.

To display the Intent in permission Settings, you need to define an Activity in the application, The Activity needs to be configured with an android. Intent. Action. VIEW_PERMISSION_USAGE the intent of the Filter, You also need to configure the android.permission.START_VIEW_PERMISSION_USAGE permission.

If your application is targeting Android 12 or higher, you must explicitly define the Android: Exported attribute for the Activity for either of these cases.

conclusion

The Privacy Information Center protects users’ privacy by increasing transparency. Developers can use the data access audit API to track data access in their applications, and use the permission intent API to justify permission usage to users.

Stay tuned for more updates. You are also welcome to click here to submit your feedback to us, or share your favorite content or questions. Your feedback is very important to us, thank you for your support!