Current location - Quotes Website - Signature design - Brief introduction of Android 10(29) adaptation scheme
Brief introduction of Android 10(29) adaptation scheme
Brief introduction of Android 10(29) adaptation scheme

1. According to Google's official documents, Android 10 has introduced many changes.

Official document:/about/versions/10/highlights? hl=zh_cn

Privacy changes in 1. 1 and Android 10

1. 1. 1 major change in privacy.

Partition storage

For the filtered view of external storage, access to application-specific files and media collections can be provided, and applications enjoying files in external storage can use application-specific directories and media collection directories.

Enhance the user's control over the positioning authority.

Only foreground permissions allow users to better control the access of applications to device location information. In the background, applications requesting access to user location information ensure elegant degradation without updating the background location information.

Use the permissions introduced in Android 10 to get location information in the background.

The system performs background activities.

For applications that start activities from the background, applications that start activities without user interaction are restricted from using activities triggered by notifications.

Non-resettable hardware identifier

Applications that restrict access to device serial numbers and IMEI use identifiers that users can reset.

Wireless scanning permission

Access to some WLAN, WLAN awareness and Bluetooth scanning methods requires accurate location permission. Requests for related usage scenarios by applications using WLAN API and Bluetooth API? ACCESS_FINE_LOCATION? limit of authority

1. 1.2 More privacy changes

Identifiers and data: New restrictions are imposed on hardware identifiers such as IMEI, serial number, MAC and similar data.

? Contact intimate information has been deleted.

? Randomly assign MAC addresses

? Access to the /proc/net file system is restricted.

? Restrictions are imposed on device identifiers that cannot be reset.

? Restrict access to clipboard data.

? Protect USB device serial number

Camera and connection: It provides stronger protection measures for camera metadata and connection API. ? Access to camera details and metadata is restricted.

? Restrictions are imposed on enabling and disabling WLAN.

? Direct access to the configured WLAN network is restricted.

? Some telephone APIs, Bluetooth APIs and WLAN API require precise location rights.

Permission: Some changes to the permission model and requirements.

? Restrict access to screen content

? User-oriented permission check (for old applications)

? Physical activity recognition

? Permission group has been deleted from the interface.

1.2 affects the behavior changes of the application.

document:/about/versions/ 10/behavior-changes-all? hl=zh_cn

Restricting non-SDK interfaces: In order to help ensure the stability and compatibility of applications, the Android platform began to restrict applications from using non-SDK interfaces at Android 9 (API level 28). Android 10 contains an updated list of restricted non-SDK interfaces (based on collaboration with Android developers and the latest internal testing). Our goal is to ensure that there are open alternatives before restricting the use of non-SDK interfaces.

Gesture navigation: Starting from Android 10, users can enable gesture navigation in devices. When enabled by the user, gesture navigation will affect all applications on the device, regardless of whether the application is aimed at API level 29. For example, if the user slides inward from the edge of the screen, the system will interpret the gesture as "back" navigation, unless the application explicitly replaces the gesture with the corresponding part of the screen.

Changes of NDK

? * * * Enjoy object must not contain text relocation.

? Path change of bionic library and dynamic linker

? System binaries/libraries are mapped to execution-only memory.

Security change

? By default, TLS 1.3 is enabled.

? TLS does not believe in the certificate signed by SHA- 1.

? Key serial is changed and improved.

? Other TLS and encryption changes

WLAN live broadcast

In Android 10, the following broadcasts related to WLAN direct connection are not sticky:

WIFI _ P2P _ connection _ change _ operation

WIFI _ P2P _ THIS _ DEVICE _ CHANGED _ ACTION

If your application relies on receiving these broadcasts at the time of registration (because it has been sticky before), please use the appropriate get () method to obtain information at the time of initialization.

WLAN awareness function?

Android 10 has expanded the scope of support, and now TCP/UDP sockets can be easily created using WLAN-aware data paths. To create a TCP/UDP socket connected to the server socket, the client device needs to know the IPv6 address and port of the server. Previously, it was necessary to communicate out of frequency (for example, using BT or WLAN to sense Layer 2 messaging) or to discover it in frequency using other protocols (for example, mDNS). With the help of Android 10, such messages can be sent as part of the network settings.

System alert window on Go device

The application running on the Android 10(Go version) device cannot obtain the SYSTEM_ALERT_WINDOW permission. This is because drawing overlapping windows will take up too much memory, which is very harmful to the performance of low-memory Android devices.

If an application running on a Go device equipped with Android 9 or earlier obtains the SYSTEM_ALERT_WINDOW permission, the permission will be retained even if the device is upgraded to Android 10. Applications without this permission will not be able to obtain this permission after the equipment is upgraded.

If the application on the Go device sends an intention with an action _ manage _ overlay _ permission operation, the system will automatically reject the request and take the user to the setting screen, which will show that the permission is not allowed, because it will slow down the running speed of the device. This method will always return false if an application on the Go device calls Settings.canDrawOverlays (). Similarly, these restrictions do not apply to applications that have obtained the SYSTEM_ALERT_WINDOW permission before the device is upgraded to Android 10.

Warning for the application of the old Android system.

On devices equipped with Android 10 or higher, users will see a warning if they run Android 5. 1(API level 22) or lower for the first time. If an application requires a user to grant permissions, the system will first provide the user with an opportunity to adjust the permissions of the application before allowing the application to run for the first time.

Due to the requirements of the target API of Google Play, users will only see these warnings when running applications that have not been updated recently. For applications distributed through other stores, we will also introduce similar target API requirements in 20 19. For a detailed understanding of these requirements, please refer to the requirements of extending the target API level in 20 19.

SHA-2 CBC encryption suite was deleted.

The following SHA-2 CBC encryption suite has been removed from the platform:

TLS _ RSA _ WITH _ AES _ 128 _ CBC _ sha 256

TLS _ RSA _ WITH _ AES _ 256 _ CBC _ sha 256

TLS _ ECD he _ ECD sa _ WITH _ AES _ 128 _ CBC _ sha 256

TLS _ ECD he _ ECD sa _ WITH _ AES _ 256 _ CBC _ sha 384

TLS _ ECD he _ RSA _ WITH _ AES _ 128 _ CBC _ sha 256

TLS _ ECD he _ RSA _ WITH _ AES _ 256 _ CBC _ sha 384

These encryption suites are not as secure as similar encryption suites using GCM, and most servers either support GCM variants and CBC variants of these encryption suites or neither.

Changes in application usage

? Improvement of usage tats application-Android10 can now use usage tats to accurately track the application usage when using the application in split screen or picture-in-picture mode. In addition, Android 10 can correctly track the usage of installation-free applications.

? Turn on grayscale mode by application-Android10 can set grayscale display mode for each application.

? Turn on interference mode by application-Android10 can selectively set the application to "interference mode". At this point, the system will disable the display of its notification and will not display it as a recommended application.

? Pause and Play-In Android 10, paused applications cannot play audio.

HTTPS connection change

If an application running on Android 10 passes null to setSSLSocketFactory (), IllegalArgumentException will appear. In previous versions, passing null to setSSLSocketFactory () has the same effect as passing it in the current default SSL socket factory.

The android.preference library has been deprecated.

Starting from Android 10, the android.preference library will be abandoned. Developers should use AndroidX preference library instead, which is part of Android Jetpack. For other resources to help with migration and development, please check the updated installation guide and our open sample applications and reference documents.

ZIP file utility library changes

Android 10 has made the following changes to the classes in the java.util.ZIP package (used to process ZIP files). These changes will make the library behavior more consistent between Android and other platforms using java.util.zip

? booster pump

In previous versions, if some methods in the interpreter class were called after calling end (), these methods would throw IllegalStateException. In Android 10, these methods will throw NullPointerException instead.

? ZipFile

In Android 10 and later versions, if the provided ZIP File does not contain any files, the constructor of the ZIP File (parameter types are file, int and Charset) will not throw a ZipException.

? ZipOutputStream

In Android 10 and later versions, if the finish () method in the ZIPOutputStream attempts to write an output stream for a zip file that does not contain any files, the method will not throw a ZipException.

Camera replacement

Many applications that use cameras assume that if the device is in portrait orientation, the physical device will also be in portrait orientation, as described in camera orientation. This assumption can be made in the past, but this situation has changed with the expansion of available device types (such as foldable devices). Making such assumptions about these devices may result in incorrect rotation and/or scaling of the camera viewfinder display.

For applications with API level or above as the target platform, android:resizeableActivity should be clearly set, and necessary functions should be provided to handle multi-window operations.

Battery consumption tracking

Starting from Android 10, whenever a device is unplugged after a major charging event, SystemHealthManager will reset its battery usage statistics. Generally speaking, a major charging event means that the battery of the equipment is fully charged, or the power of the equipment changes from almost exhausted to about to be fully charged.

Before Android 10, whenever the power plug of the device is unplugged, the battery usage statistics will be reset no matter how small the battery charge changes.

Android Beam has been deprecated.

In Android 10, we formally gave up Android Beam, which is an old function and can realize data sharing among multiple devices through near field communication (NFC). We also abandoned some related NFC API. Android Beam is still available to the partners of equipment manufacturers in need, but it is no longer in the active development stage. However, Android will continue to support other NFC functions and APIs, and usage scenarios such as reading data from tags and paying will continue to be implemented as expected.