Note: When the user presses the stop button next to your application, the system will stop your entire application, not just the running foreground service.
JobScheduler enables applications to use JobInfo. Builder.setPrefetch () marks certain jobs as "pre-fetch" jobs, which means that ideally, these jobs should be run before the next startup of the application to improve the user experience. In the past, JobScheduler only used this signal to give prefetch jobs an opportunity to use idle or redundant data.
In Android 13, the system will now try to determine the next startup time of the application and run the pre-extraction job according to the estimated value. Before the next application starts, applications should try to use pre-extraction jobs to complete any work they want.
Android 13(API level 33) introduces battery resource utilization, which provides various methods for the system to better manage the battery life of equipment:
Android 13(API level 33) introduces a new runtime notification right: POST_NOTIFICATIONS. This change helps users pay attention to the most important notifications.
Note: Notifications related to media sessions and applications that manage the call itself are not affected by this behavior change.
If the application allows users to copy sensitive content (such as passwords or credit card information) to the clipboard, a flag must be added to the ClipDescription of ClipData before calling ClipboardManager # setPrimaryClip (). Add this flag to prevent sensitive content from appearing in the content preview.
To mark sensitive content, add a boolean value to the ClipDescription. All applications should do this regardless of the target API level of the application.
If your application uses the abandoned android:sharedUserId attribute and no longer depends on the function of this attribute, then you can set the Android: ShareUserMaxSDKversion attribute to 32, and this new attribute will inform the system that your application no longer depends on * * * to enjoy the user id. If your application declares Android: shareusermaxsdkversion and is installed on a device with Android 13 or later for the first time, the application will behave as if you have never defined android:sharedUserId. The updated application will still use the existing * * * user ID.
* * * Sharing the user ID will lead to uncertain behavior in the package manager. Your application should use appropriate communication mechanisms (such as services and content providers) to achieve interoperability between * * * shared components.
Note: If you have defined the android:sharedUserId attribute in the manifest, please do not delete it. Doing so will cause the application update to fail.
If users deny notification permission, they will still see notifications related to these foreground services in FGS Task Manager, but they will not see these notifications in the drawer notification bar.
In the previous version of Android, users need to grant ACCESS_FINE_LOCATION permission to your application, so that the application can complete many common Wi-Fi use cases, Wi-Fi direct connection, Wi-Fi RTT and other hot-spot related applications.
Because it is difficult for users to associate the location information authority with the Wi-Fi function, Android 13(API level 33) introduces a new runtime authority in the NEARBY _ DEVICES authority group, which is suitable for applications that manage the connection between devices and nearby Wi-Fi access points. This right (near _ wifi _ devices) can satisfy these Wi-Fi use cases.
As long as your application doesn't deduce the physical location through the Wi-Fi API, when you use the Wi-Fi API with Android 13 or higher as the target platform, you can request near _ wifi _ devices instead of ACCESS_FINE_LOCATION.
Note: If you call the Wi-Fi API, this change will only affect your application.
If your application is for Android 13, you must request one or more new permissions instead of READ_EXTERNAL_STORAGE and WRITE_EXTERNAL_STORAGE permissions. If the user previously granted READ_EXTERNAL_STORAGE permission to your application, the system will automatically grant each new permission to your application.
Note: If your application only needs to access pictures, photos and videos, consider using a photo selector instead of declaring READ_MEDIA_IMAGES and READ_MEDIA_VIDEO permissions.
Note: You do not need to declare the WRITE_EXTERNAL_STORAGE permission.
If your application takes Android 13 as the target platform and needs to access body sensor information when running in the background, you must declare a new BODY_SENSORS _ background permission in addition to the existing body _ sensors permission.
When your application sends an intention to the export component of other applications targeting Android 13 or later, only when the intention and.
To help improve the security of the runtime receiver, Android 13 allows you to specify whether a specific broadcast receiver in your application should be exported and made visible to other applications on the device. If you export a broadcast receiver, other applications will be able to send unprotected broadcasts to your application. This export configuration can be used in applications targeting Android 13 or later, which helps to prevent the main source of application vulnerabilities.
In the early version of Android, any application on the device can send unprotected broadcasts to dynamically registered receivers, unless the receivers are protected by signature rights.
Android 13(API level 33) provides a brand-new photo selector experience. When the application starts the photo selector, users can choose to share specific pictures and videos (such as profile photos) with the application instead of giving the application permission to view the entire media library.
The photo selector can provide better privacy protection for users, because your application does not need to declare any runtime permissions. In addition, the photo selector provides a built-in standardized interface for applications, thus creating a more consistent user experience.
Note: At present, we recommend using the photo selector to access users' photos and videos.
Android 13(API level 33) introduces a new runtime permission in the NEARBY _ DEVICES permission group, which is suitable for applications that manage devices to connect with nearby Wi-Fi access points. These applications must declare a new authority near _ wifi _ devices when calling multiple different Wi-Fi API. In addition, as long as the application does not deduce the physical location through the Wi-Fi API, there is no need to declare the ACCESS_FINE_LOCATION permission for Android 13 or later.
If your application takes Android 13 as the target platform, you can use the USE_EXACT_ALARM permission automatically granted to the application. However, if your application wants to use this permission, it must meet at least one of the following conditions:
If your application has set an accurate alarm clock, but it does not meet any of the conditions shown in the previous list, please continue to declare the SCHEDULE_EXACT_ALARM permission instead, and be prepared for the user to refuse to grant you the corresponding access permission for the application.
Starting from Android 13, applications can revoke the runtime permissions previously granted by the system or users. This API allows your application to perform privacy enhancement tasks, as follows:
To revoke a specific run-time permission, pass the name of the permission into revokeSelfPermissionOnKill (). If you want to revoke a set of runtime permissions at the same time, please pass the names of this set of permissions into revokeSelfPermissionsOnKill (). Undo asynchronous occurrence and terminate all processes associated with the UID you applied.
Android 13 can support the APK signature scheme v3. 1, which is an improvement of the existing APK signature scheme v3 and solves some known problems of the APK signature scheme v3. Specifically, v3. 1 signature scheme allows applications to support both original signers and substitute signers in a single APK. In addition, the solution also supports SDK version positioning function, which will allow rotation positioning to a higher version of the platform.
The V3. 1 signature scheme uses a new block ID that is not recognized in 12L or earlier versions. Therefore, the platform applies the following signer behaviors:
Applications that have not rotated their signing keys do not need to do anything else. Whenever these applications choose to rotate, the new v3. 1 signature scheme will be applied by default.