The Android version fits the full guide

  • When I was working on Android version adaptation, I was very miserable. At that time, I was wondering if there was a document that collected all the information about Android version adaptation, so that I didn’t need to look around on the Internet, so that I could devote my time and energy to adaptation. Every time a new Version of Android came out, the idea got stronger and stronger, and I finally planned it when Android 11 came out, and I finally got it done when Android 12 came out, and it took a long time because I was collecting good data, At the same time, I have been thinking about what kind of adaptation document is what we need. I will simply divide the adaptation document into the following parts:

    • The official documentation

      • New features

      • Behavior change

    • The related resources

      • Adapt links to articles

      • Adaptive frame link

  • Why make this an open source project? Because I will keep updating, and I welcome you to recommend good articles to me through the issue, and I will put them up after I pass the review. To do an open source project well needs everyone’s contribution. Open source is a process of mutual help, and IT is difficult for me to do it well without everyone’s support.

Adaptation process

  • Here to fitAndroid 12For example, the first step will be in the main modulebuild.gradleModify in filetargetSdkVersioncompileSdkVersionThe values of these two
android {

    compileSdkVersion 31
    defaultConfig {
        targetSdkVersion 31}}Copy the code
  • Next in the code to do some version of the judgment, and do a good new version of the adaptation and compatible with the old version
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
    ......
} else{... }Copy the code
  • What’s the difference between targetSdkVersion and compileSdkVersion?

    • TargetSdkVersion: If the targetSdkVersion of the application is lower than the system version, then the new system will do backward compatibility for some new features. If we want to adapt an Android version, TargetSdkVersion must be adjusted above this version level, otherwise some adaptation exceptions may occur on some models. If we simply increase the targetSdkVersion level without adapting to the features of the new version, the application may suffer from a functional anomaly on the new system, usually in the form of an application crashing or not getting data.

    • CompileSdkVersion: source code version. You can change this level to change the version of the Android SDK source code you see in your code and determine which version the compiler will use to check your code.

  • Finally, a corresponding table of Android version information is attached

Android version API level Version of the code Release time
Android 12 31 S October 4, 2021
Android 11 30 R 9 September 2020
Android 10 29 Q September 3, 2019
The Android 9.0 28 P August 7, 2018
The Android 8.1 27 O_MR1 December 5, 2017
The Android 8.0 26 O August 22, 2017
The Android 7.1 25 N_MR1 December 5, 2016
The Android 7.0 24 N August 22, 2016
The Android 6.0 23 M September 29, 2015
The Android 5.1 22 LOLLIPOP_MR1 March 10, 2015
The Android 5.0 21 LOLLIPOP October 15, 2014
The Android 4.4 19 KITKAT October 31, 2013

The document directory

  • The Android 12.0

  • The Android 11.0

  • The Android 10.0

  • The Android 9.0

  • 8.0/8.1 of the Android

  • The Android 7.0/7.1.1

  • The Android 6.0

  • 5.0/5.1 of the Android

  • The Android 4.4

The Android 12.0

New features

  • Splash screen

  • Rich media content insertion

  • Compatible media transcoding

  • Performance level

  • Audio focus improvements

  • Picture in picture (PiP) improvements

  • New Bluetooth permissions in Android 12

  • Android 12 widget improvements

  • New enterprise features in Android 12

Behavior change

  • Behavior changes for all applications

    • The user experience

      • Scrolling effect

      • The front desk service notifies the user of experience delays

      • Improved gesture navigation in Immersive mode

      • Network Intent Parsing

      • Restricted application standby mode storage partition

      • Display#getRealSize and getRealMetrics: waste and sandbox

    • Graphics and pictures

      • Improved refresh rate switching
    • Security and Privacy Settings

      • Switch between microphone and camera

      • Microphone and camera indicators

      • The application cannot close the system dialog box

      • Untrusted touch events are masked

      • Permissions Visibility of software packages

      • Removed the Bouncy Castle implementation

      • Clipboard access notification

    • connectivity

      • Passpoint update
    • Updated restrictions on non-SDK interfaces

  • Behavior change for targetSdkVersion 31+ application

    • The user experience

      • Picture-in-picture behavior improved

      • Custom notification

      • Android App Links validation changes

    • Privacy Settings

      • General location

      • The application of dormancy

      • Mobile sensors have sampling rate limits

      • Data access audit

      • Modern SameSite cookies in webViews

      • ADB Backup Restrictions

    • security

      • More secure component exports

      • Create immutable intents to be processed whenever possible

      • An unsafe intent was started

    • performance

      • Foreground service startup restrictions

      • Precise alarm permissions

      • Notify trampoline of restrictions

    • Backup and Restore

    • connectivity

      • Concurrent point-to-point + Internet connection

      • Enable screen off for NFC payment

    • Supplier base

      • Vendor-provided native shared libraries
    • Updated non-SDK restrictions

The related resources

  • Android 12 officially released | developers to a new stage

  • Introduction to Android 12 Adaptation

  • OPPO Open Platform – Android 12 Application compatibility guide

  • Update your widgets for Android 12

  • New app splash screen for Android 12

  • SplashScreen: Enables new app launch effects

  • Android 12 SplashScreen API quick start

  • The Jetpack SplashScreen API is used on all Android systems with a summary, including analysis of principles

  • New widgets on Android 12: beautiful, convenient and practical

  • Android 12 Bluetooth permission adaptation scheme

  • The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

The Android 11.0

An overview of

Privacy change Affected applications Mitigation strategy
Enforce partitioned storage mechanismApplications targeting Android 11 or later will always be affected by partitioned storage behavior Apps that target Android 11 or higher, and apps that target Android 10 and do notrequestLegacyExternalStorageSet totrueTo disable partitioned storage applications Update your application to use partitioned storageLearn more about partitioned storage changes
A single licenseWith the single authorization feature, users can grant temporary access to location information, microphones, and cameras An app that runs on Android 11 or higher and requests location information, microphone or camera access Before attempting to access data protected by a privilege, check whether your application has that privilegeFollow best practices for requesting permissions
Automatic reset permissionIf the user has not interacted with the app for several months on Android 11 or later, the system will automatically reset the app’s sensitive permissions An app that targets Android 11 or higher and does most of the work in the background Ask the user to prevent the system from resetting application permissionsLearn more about automatic reset permissions
Background location information access permissionAndroid 11 changes the way users grant background location permissions to applications Android 11 or higher is the target platform and requiredAccess location information in the backgroundThe application of Access to location information in the foreground (rough or precise) and in the background is progressively requested through multiple separate calls to the permission request method. If necessary, describe the benefits to be gained by granting the permissionLearn more about background access to location information in Android 11
Package visibilityAndroid 11 changes the way apps query and interact with other installed apps on the same device Apps that target Android 11 or higher and interact with other installed apps on the device will<queries>Element to the application manifestLearn more about package visibility
The front desk serviceAndroid 11 changes the way foreground services access location information, camera and microphone related data Apps that run on Android 11 or later and access location information, camera, or microphone in foreground services Declare for foreground services that need access to cameras and microphones respectivelycameramicrophoneFront desk service type. Note, however, that foreground services that start while the app is running in the background usually don’t have access to location information, cameras, or microphones.Understand the changes to the front desk service in detail

New features

  • Add 5G capabilities to your applications

  • Enforce portal API support

  • Securely sharing large data sets

  • Contacts and Conversations

  • Message box

  • Control external equipment

  • Integrate auto-fill function with keyboard

Behavior is changing

  • Behavior changes for all applications

    • The right to privacy

      • A single license

      • Visibility of the Permissions dialog box

      • Data access audit

      • System alert window permissions

      • Permanent SIM card identifier

    • Contact history Notice

    • security

      • SSL sockets use the Conscrypt SSL engine by default

      • Scudo Hardened Allocator

      • Application usage statistics

      • Simulator support for 5G

    • Performance and debugging

      • The JobScheduler API calls restrict debugging

      • File descriptor debugger (FDSAN)

    • Non-sdk interface restrictions

    • Version V1 of Google Maps shared Library has been removed

    • Interact with other applications

      • Share Content URI
  • Behavior change for targetSdkVersion 30+ application

    • The right to privacy

      • Force partitioned storage

      • Automatic reset permission

      • Background access to location information

      • Package visibility

    • security

      • Heap pointer marker

      • Update of message box

    • The network connection

      • Restrict read access to the APN database
    • Accessibility services

      • Declare the interaction with the TTS engine in the manifest file

      • Declare accessibility button usage in the metadata file

    • The camera

      • Media Intents require the system’s default camera
    • Application packaging and installation

      • Compressed resource files

      • Now you need the APK signature scheme V2

    • Firebase

      • Firebase JobDispatcher and GCMNetworkManager
    • Device to device file transfer

    • OnSharedPreferenceChangeListener callback to change

    • Non-sdk interface restrictions

The related resources

  • Android 11 Developer manual

  • Android11 is really coming, and the best fit practice guide is here

  • Android 11 changes and adaptation guide

  • OPPO Open Platform – Android 11 Application compatibility guide

  • Android 11 External storage permission Adaptation Guide and solutions

  • Wechat Open Platform – Android 11 system policy update

  • Android 11 bypasses reflection restrictions

  • Android 11 Software package visibility adaptation

  • Android 11 feature adjustment: Installing apps from external sources requires a restart of the APP

  • Android 11 cannot display an adaptation of the custom Toast style in the background

The Android 10.0

An overview of

Privacy change Affected applications Mitigation strategy
Partition storageA filtered view for external storage that provides access to an application-specific set of files and media Applications that access and share files in external storage Use application-specific directories and media collection directoriesFor details
Enhanced user control over location permissionsThis function allows users to better control applications’ access to device location information An application that requests access to user location information while in the background Make sure to gracefully degrade to get location information in the background using the permissions introduced in Android 10 without background location updatesFor details
The system performs background activitiesRestrictions are imposed on starting activities from the background An application that starts an Activity without user interaction Activity triggered by notificationFor details
A hardware identifier that cannot be resetRestrictions are imposed on access device serial numbers and IMEI Access device serial numbers or IMEI applications Use an identifier that the user can resetFor details
Wireless scan permissionAccess to certain WLAN, WLAN awareness, and Bluetooth scanning methods requires precise location permission WLAN API and Bluetooth API applications Request for related usage scenariosACCESS_FINE_LOCATIONpermissionsFor details

New features

  • Folding screen

  • 5 g

  • Notification message reply

  • The dark theme

  • Gestures to navigate

  • Settings panel

  • Shared Shortcuts

Behavior is changing

  • Behavior changes for all applications

    • Restrict non-SDK interfaces

    • Gestures to navigate

    • NDK

      • Shared objects may not contain text relocation
    • Bionic library and dynamic linker path changes

    • System binaries/libraries are mapped to execution-only memory

    • security

      • TLS 1.3 is enabled by default

      • TLS does not trust certificates signed with SHA-1

      • KeyChain behavior changed and improved

      • Other TLS and encryption changes

    • WLAN direct broadcast

    • WLAN Awareness function

    • Go SYSTEM_ALERT_WINDOW on the device

    • A warning about apps targeting older Versions of Android

    • Removed sha-2 CBC encryption suite

    • Application Usage

    • HTTPS Connection Change

    • ZIP file utility library changed

      • Inflater

      • ZipFile

      • ZipOutputStream

    • Camera Change

    • Battery usage tracking

    • Android Beam is deprecated

  • Behavior change for targetSdkVersion 29+ application

    • About limiting updates to non-SDK interfaces

    • The Shared memory

    • Remove execution permission from the application home directory

    • The Android runtime only accepts OAT files generated by the system

    • Enforce AOT correctness in ART

    • Permission change for full-screen Intent

    • Foldable devices are supported

    • Java. IO. FileChannel. The map () change

The related resources

  • Android 10 Adaptation Guide

  • Temporarily deactivate partitioned storage

  • Android stores use cases and best practices

  • Android 10(Q)/11(R) partition storage adaptation

  • Android 10 partitioned storage adaptation

  • Android 10 adaptation points, scoped storage

  • Android MediaStore Api use

  • Android dark mode adaptation principle analysis

  • Android 10 ADAPTS to bullet points and dark themes

  • Android dark mode project application

  • Android screen folding adaptation guide

The Android 9.0

New features

  • Use Wi-Fi RTT for indoor positioning

  • Display notch support

  • notice

  • Multi-camera support and camera updates

  • ImageDecoder for drawable objects and bitmaps

  • animation

  • HDR VP9 video, HEIF image compression and Media API

  • The cost sensitivity of traffic in JobScheduler

  • Neural Networks API 1.1

  • Self-filling frame

  • Security enhancement

  • Android backup

  • Accessibility function

  • rotating

  • The text

  • Device side system tracing

Behavior is changing

  • Behavior changes for all applications

    • Power management

    • Privacy change

    • Restrictions on using non-SDK interfaces

    • Safety behavior change

      • Equipment safety changes
    • ICU library update

    • The Android Test changes

    • Java UTF decoder

    • Use the host name of the certificate for authentication

    • Network address query may cause network violations

    • Socket flag

    • Number of bytes available in the socket reported

    • The application is no longer accessiblext_qtaguidFiles in folders

    • Enforce it nowFLAG_ACTIVITY_NEW_TASKrequirements

    • Screen rotation change

    • Deprecation of the Apache HTTP client affects applications that use non-standard ClassLoaders

    • Enumeration camera

  • Behavior change for targetSdkVersion 28+ application

    • The front desk service

    • Privacy change

    • Framework security changes

    • Network Connection Changes

      • Network connection data counting and multipathing

      • Deprecated Apache HTTP client

    • Interface changes

      • View the focus

      • CSS RGBA hex value handling

      • File MIME type sniffing: URI

      • Document scroll element

      • Notification from a suspended application

The related resources

  • Android 9.0 Adaptation Guide

  • Android bangs screen adaptation full walkthrough

  • Android 9.0 system new features, bang-screen devices for adaptation

  • Android 9.0/P WebView multi-process use problem

  • Reflection Blacklist (by packet name)

  • Reflection Blacklist (by class name)

  • Another way around the limitations of non-public apis above Android P

8.0/8.1 of the Android

New features

  • New features for Android 8.0

    • The user experience

      • notice

      • Self-filling frame

      • Picture in picture mode

      • Downloadable font

      • Fonts in XML

      • Automatically resize TextView

      • Adaptive icon

      • Color management

      • WebView API

      • Fixed shortcuts and widgets

      • Maximum screen aspect ratio

      • Multi-monitor support

      • Uniform layout of margins and margins

      • A pointer to capture

      • Application category

      • Android TV launcher

      • AnimatorSet

      • Input and navigation

    • system

      • View default focus

      • New StrictMode check procedure

      • Cache data

      • Content providers are paginated

      • Content refresh request

      • JobScheduler improvement

      • Custom data stores

      • FindViewById Signature change

    • Media enhancement

      • VolumeShaper

      • Audio focus enhancement

      • Index of the media

      • MediaPlayer

      • Audio recorder

      • Audio playback control

      • Enhanced media file access

    • The connection

      • WLAN perception

      • bluetooth

      • Matching equipment

    • Shared

      • Intelligence sharing

      • Smart text selection

    • Accessibility function

      • Barrier-free button

      • Independent volume adjustment

      • Fingerprint gestures

      • Word level highlights

      • Standardize single-ended range values

      • Tooltip text

      • Sequential gesture dispatch

    • Security and Privacy

      • permissions

      • New account access and Discovery API

      • Google Safe Browsing API

    • test

      • Instrument test

      • A simulated Intent for testing

    • Runtime and tools

      • Platform optimization

      • Updated Java support

      • Updated ICU4J Android Framework API

      • Android enterprise edition

  • New features in Android 8.1

    • Android Oreo (Go Version)

    • Neural Networks API

    • Auto-fill frame updates

    • notice

    • The EditText update

    • Programmatic secure browsing operations

    • Video thumbnail extractor

    • Shared memory API

    • WallpaperColors API

    • Fingerprint update

    • Encryption update

Behavior change

  • Behavior changes for all applications

    • Background execution restriction

    • Android background location restrictions

    • Apply shortcut keys

    • Locale and internationalization

    • Remind the window

    • Input and navigation

    • Web form auto-fill

    • Accessibility function

    • Network connections and HTTP(S) connections

    • bluetooth

    • Seamless connection

    • security

    • privacy

    • Logs uncaught exceptions

    • Changes to contact provider usage statistics

    • Processing of sets

    • Android enterprise edition

  • Behavior change for targetSdkVersion 26+ application

    • Remind the window

    • Content change notice

    • View the focus

    • security

    • Account access and detectability

    • privacy

    • permissions

    • The media

    • The native library

    • Processing of sets

    • Class loading behavior

The related resources

  • Android 8.0 ADAPTS to the north

  • Android notification bar micro tips, 8.0 system adaptation of the notification bar

  • Create and manage notification channels

  • Android application icon micro tips, 8.0 system application icon adaptation

  • Compatible with Android 8.0 multi-language solutions

  • Android 8.0 Opaque Activities – Only fullscreen Opaque Activities can request orientation

The Android 7.0/7.1.1

New features

  • New features for Android 7.0

    • Multi-window support

    • Notification enhancement

    • JIT/AOT compilation guided by configuration files

    • Quick application installation path

    • Anytime, anywhere low power consumption mode

    • The background to optimize

    • SurfaceView

    • Traffic saver

    • Vulkan API

    • Quick Settings Tile API

    • Number block

    • To filter

    • Multi-language area support, more languages

    • New emojis

    • ICU4J API in Android

    • WebView

      • Chrome works with WebView

      • Multiple processes

      • Javascript runs before the page loads

      • Geolocation on the unsafe starting point

      • Test the WebView beta

    • OpenGL ™ ES 3.2 API

    • Android TV recording

    • Android for Work

      • Work data security challenges

      • Close work

      • Always on VPN

      • Custom Configuration

    • Accessibility enhancement

    • Direct start

    • Key authentication

    • Network Security Configuration

    • Default trusted certificate authority

    • APK signature scheme v2

    • Scope directory access

    • Keyboard shortcut tools

    • Custom Pointer API

    • Sustained Performance API

    • VR support

    • Print Service Enhancement

    • FrameMetricsListener API

    • The virtual file

  • New features in Android 7.1

    • Apply shortcuts

    • Keyboard image support

    • The new professional emoji

    • Enhanced dynamic wallpaper metadata

    • Circular icon resource

    • Storage manager intent

    • Improved VR thread scheduling

    • Demo User tips

    • API for carrier and calling applications

    • New screen density for wearables

Behavior change

  • Battery and Memory

    • Low power consumption mode

    • The background to optimize

  • System Permission Change

  • Share files between applications

  • Accessibility improvement

    • The screen zoom

    • Visual Settings in the Setup wizard

  • NDK applications link to platform libraries

    • Check whether your application uses private libraries

    • Update your application

  • Android for Work

  • Annotations to retain

  • Other Important Notes

The related resources

  • Android 7.0 De-cratering Guide

  • Android 7.0 adaptation tutorial

  • Let’s take a look at the new FileProvider feature in Android 7.0

  • Official documentation – The FileProvider class

  • Toast crash investigation and repair in Android 7.1

  • PopupWindow compatibility issues on Android N(7.0)

  • Android 7.0 WebView cannot be opened on some models

The Android 6.0

New features

  • Fingerprint authentication

  • To confirm the credentials

  • Application link

  • Automatic Backup application

  • Direct sharing

  • Voice interaction

  • Assist API

  • Available storage devices

  • notice

  • Bluetooth stylus support

  • Improved Bluetooth low power scan

  • Hotspot 2.0 Version 1 support

  • 4K display mode

  • Themed ColorStateList

  • Audio features

  • Video function

  • Camera function

    • Flashlight API

    • Reprocessing API

  • Android for Work

Behavior change

  • Runtime permissions

  • Low power consumption mode and application standby mode

  • The Apache HTTP client is cancelled

  • BoringSSL

  • Hardware identifier access

  • notice

  • Audio manager changes

  • The text choose

  • Browser bookmark changes

  • Android keystore changed

  • WLAN and network connection changes

  • Camera Service changes

  • The runtime

  • APK validation

  • USB connection

  • Android for Work changes

The related resources

  • Android 6.0 run permission parsing

  • Official Documentation – Request application permission

  • List of all Android permissions

5.0/5.1 of the Android

New features

  • New features for Android 5.0

    • The user interface

      • The Material Design support

      • Concurrent documents and activities in recently used application screens

      • Update the WebView

      • Screen capture and sharing

    • notice

      • Lock screen notification

      • Notification metadata

    • graphics

      • OpenGL ES 3.1 support

      • Android expansion pack,

    • The media

      • Camera API for advanced Camera functions

      • The audio playback

      • Media playback control

      • Press browse

    • storage

      • Directory to choose
    • Wireless and Connectivity

      • Multiple network connections

      • Bluetooth Low power consumption

      • NFC enhancements

    • Volta project

      • Plan and schedule operations

      • Use developer tools for batteries

    • Android in the workplace and education

      • Host configuration

      • Equipment owner

      • Fixed screen

    • Print the framework

      • Render PDF to bitmap
    • system

      • Application usage statistics
    • Testing and support tools

    • Test and auxiliary tool improvement

    • IME

      • More convenient input language switch
    • Listing announcement

      • Declarable required functionality

      • User permissions

  • New features in Android 5.1

    • Multiple SIM card support

    • Deprecated HTTP class

    • Carrier service

Behavior change

  • Android Runtime (ART)

  • notice

    • The Material Design style

    • Sound and vibration

    • Lock screen visibility

    • Media player

    • Floating notice

  • Media controls and RemoteControlClient

  • getRecentTasks()

  • 64-bit support in the Android NDK

  • Bind to a service

  • WebView

  • The custom permission must be unique

    • Applications that use duplicate custom permissions

    • Precautions for your application

    • New installation and updates

    • Existing installations updated using Android 5.0

    • advice

  • The default TLS/SSL configuration is changed

    • The server does not support any enabled encryption suites

    • The application makes incorrect assumptions about the encryption suite used to connect to the server

    • The server does not support TLSv1.1, TLSv1.2, or the new TLS extension

  • Managed configuration files are supported

    • To handle the Intent

    • Share files among configuration files

    • Lock screen widget support has been removed

The Android 4.4

New features

  • Print the framework

    • Print generic content

    • Print the image

    • Build a print service

  • SMS provider

  • Wireless and Connectivity

    • Host card simulation

    • NFC reader mode

    • Infrared transmitter

  • multimedia

    • Adaptive playback

    • Audio on demand timestamp

    • Surface image reader

    • Peak and effective value (RMS) measurements

    • Volume booster

    • The remote control

    • Score from remote control

    • Hidden subtitles

  • Animation and graphics

    • Scenes and transitions

    • Suspended animation

    • Reusable bitmaps

  • User content

    • Memory access framework

    • Access to external storage space

    • Synchronous adapter

  • User input

    • New sensor types

    • Batch sensor events

    • Controller Identity

  • The user interface

    • Immersive full screen mode

    • Transparent system status bar

    • Enhanced notification listeners

    • Drawable RTL layout mirror

    • Accessibility function

  • Application permissions

  • Equipment function

Behavior change

  • External storage

  • WebView

  • AlarmManager

  • ContentResolver

Thank youAndroid wheels elder brother