[Android Learning note] Android Down and

Source: Internet
Author: User

Android Backwards-compatible ideas:
Use the high-version API to determine the API version of the real-world runtime platform at runtime, and to do different processing according to different versions

Key classes:
Build.class
It defines the API version related information

Inner class: VERSION
Defines the version information for the current system, which contains the SDK version information
Build.VERSION.SDK_INT can get the SDK version number of the currently running system

Inner class: Version_codes
Enumeration information for each version is defined

When fitting:

if (Build.VERSION.SDK_INT >= build.version_codes. Honeycomb) {    //  use a higher version of the API}orelse{    //  Use the lower version of the API here}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.