- Android Basics
- Android - Home
- Android - Overview
- Android - Environment Setup
- Android - Architecture
- Android - Application Components
- Android - Hello World Example
- Android - Resources
- Android - Activities
- Android - Services
- Android - Broadcast Receivers
- Android - Content Providers
- Android - Fragments
- Android - Intents/Filters
- Android - User Interface
- Android - UI Layouts
- Android - UI Controls
- Android - Event Handling
- Android - Styles and Themes
- Android - Custom Components
- Android Advanced Concepts
- Android - Drag and Drop
- Android - Notifications
- Location Based Services
- Android - Sending Email
- Android - Sending SMS
- Android - Phone Calls
- Publishing Android Application
- Android Useful Examples
- Android - Alert Dialoges
- Android - Animations
- Android - Audio Capture
- Android - AudioManager
- Android - Auto Complete
- Android - Best Practices
- Android - Bluetooth
- Android - Camera
- Android - Clipboard
- Android - Custom Fonts
- Android - Data Backup
- Android - Developer Tools
- Android - Emulator
- Android - Facebook Integration
- Android - Gestures
- Android - Google Maps
- Android - Image Effects
- Android - ImageSwitcher
- Android - Internal Storage
- Android - JetPlayer
- Android - JSON Parser
- Android - Linkedin Integration
- Android - Loading Spinner
- Android - Localization
- Android - Login Screen
- Android - MediaPlayer
- Android - Multitouch
- Android - Navigation
- Android - Network Connection
- Android - NFC Guide
- Android - PHP/MySQL
- Android - Progress Circle
- Android - ProgressBar
- Android - Push Notification
- Android - RenderScript
- Android - RSS Reader
- Android - Screen Cast
- Android - SDK Manager
- Android - Sensors
- Android - Session Management
- Android - Shared Preferences
- Android - SIP Protocol
- Android - Spelling Checker
- Android - SQLite Database
- Android - Support Library
- Android - Testing
- Android - Text to Speech
- Android - TextureView
- Android - Twitter Integration
- Android - UI Design
- Android - UI Patterns
- Android - UI Testing
- Android - WebView Layout
- Android - Wi-Fi
- Android - Widgets
- Android - XML Parsers
- Android Useful Resources
- Android - Questions and Answers
- Android - Useful Resources
- Android - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Android - Support Library
When you develop an app on a latest version of android like 5.x and you also want it to run on those devices which are running older versions of android like 3.2 e.t.c. you can't do that until you add backward compatibility to your code.
To provide this backward compatibility android provides you the Android Support Library package. The Android Support Library package is a set of code libraries that provide backward-compatible versions of Android framework APIs as well as features that are only available through the library APIs. Each Support Library is backward-compatible to a specific Android API level.
Including the Support Libraries in your Android project is considered a best practice for application developers, depending on the range of platform versions your app is targeting and the APIs that it uses.
Support Library Features
The Android Support Library package contains several libraries that can be included in your application. Each of these libraries supports a specific range of Android platform versions and set of features.
In order to effectively use the libraries, it is important to consider that which API level you want to target as each library supports different API level.
Following is a brief description of android support libraries and API level they support.
Sr.No | Version & Features |
---|---|
1 |
v4 Support Library This library is designed to be used with Android 1.6 (API level 4) and higher. |
2 |
v7 Support Library There are several libraries designed to be used with Android 2.1 (API level 7) and higher. |
3 |
v8 Support Library This library is designed to be used with Android (API level 8) and higher. |
4 |
v13 Support Library This library is designed to be used for Android 3.2 (API level 13) and higher. |
Please Remember that use of Android Support Library in your app code is encouraged and preferred. By using these libraries you can increase your target market and target audience.
Downloading the Support Libraries
Please note that before installing the support library packages you should be clear that what feature you want to use in your app.
The Android Support Library package is available through the Android SDK Manager.
Follow the following steps to download the support library package through the SDK Manager.
Start the android SDK Manager.
In the SDK Manager window, scroll to the end of the Packages list, find the Extras folder.
Select the Android Support Library item.
Click the Install packages button.
After downloading, the tool installs the Support Library files to your existing Android SDK directory. The library files are located in the following subdirectory of your SDK:
Choosing Support Libraries
Before adding a Support Library to your application, decide what features you want to include and the lowest Android versions you want to support.
Changes in Android build.gradle
If you are increasing the backward compatibility of your existing application to an earlier version of the Android API with the Support Library, make sure to update your application's build.gradle. Specifically, you should update the compileSdkVersion element in the build.gradle to the new, lower version number, as shown below −
android { compileSdkVersion 24 buildToolsVersion "24.0.1" defaultConfig { applicationId "com.example.tutorialspoint7.myapplication" minSdkVersion 23 targetSdkVersion 24 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } }
This change tells Google Playstore app that your application can be installed on devices with Android minimum version of 23.