1.1 Background and System Architecture Analysis
Category Android Basic Tutorial
1. Android Background and Current Status
The Android system was created by Andy Rubin and later acquired by Google; the earliest version was Android 1.1. The latest version is Android M, introduced at the Google I/O conference on May 28th. Interestingly, Android versions are named after desserts. Below is a table of 15 Android versions, their corresponding API numbers, and release dates!
System Version Name | API Version Number | Release Date |
---|---|---|
Android 1.5: Cupcake | 3 | 2009.4.30 |
Android 1.6: Donut | 4 | 2009.9.15 |
Android 2.0/2.0.1/2.1: Eclair | 5/6/7 | 2009.10.26 |
Android 2.2/2.2.1: Froyo | 8 | 2010.5.20 |
Android 2.3: Gingerbread | 9 | 2010.12.7 |
Android 3.0: Honeycomb | 11 | 2011.2.2 |
Android 3.1: Honeycomb | 12 | 2011.5.11 |
Android 3.2: Honeycomb | 13 | 2011.7.13 |
Android 4.0: Ice Cream Sandwich | 14 | 2011.10.19 |
Android 4.1: Jelly Bean | 16 | 2012.6.28 |
Android 4.2: Jelly Bean | 17 | 2012.10.30 |
Android 4.3: Jelly Bean | 18 | 2013.7.25 |
Android 4.4: KitKat | 19 | 2013.11.01 |
Android 5.0: Lollipop | 21 | 2014.10.16 |
Android M: Preview | 22 | 2015.5.28 |
In addition to these public versions, there are other versions as well. As of January 2015, the market share of each version is as follows:
#
After reviewing the above information, we might have a question: With so many system versions, which one should we target for development? This is a problem that every Android developer must face, known as Android's "fragmentation" issue, which can be divided into two parts: ① System Fragmentation: When developing an app, we might need to ensure compatibility with older versions, such as down to version 2.3. Due to the prevalence of custom ROMs, many users modify the original system, leading to issues where features work on stock systems but not on custom ROMs, such as camera access. ② Screen Fragmentation: There are various screen sizes for phones, such as 4.3 inches, 4.5 inches, 4.7 inches, 5.0 inches, 5.3 inches, etc. In addition to phones, there are also Android tablets. Therefore, when developing, we might need to address screen compatibility issues. However, as beginners, we don't need to consider these complex aspects initially; we will delve into them during actual development.
2. Android System Features and Platform Architecture
System Features:
>
The application framework supports component reuse and replacement (if an app adheres to the framework's conventions, other apps can also use its modules)
Dalvik virtual machine: optimized for mobile devices
Integrated browser: powered by the open-source WebKit engine
SQLite for structured data storage
Optimized graphics library, multimedia support, GSM telephony, Bluetooth, etc.
Built using a software stack approach
Platform Architecture Diagram:
Simple Understanding of the Architecture:
>
Application Layer: Development at this level involves creating apps, including system-built applications, using Java
Application Framework Layer: Both system-built and custom apps use this layer. For example, if we want to implement a call blocker, we would use the TelephonyManager By using this layer, we can easily implement call blocking without worrying about the underlying implementation
Libraries + Android Runtime: Android provides a set of C/C++ libraries used by different components of the platform, such as the media framework; Android Runtime consists of the Android core library set + Dalvik virtual machine. The Dalvik virtual machine is designed for mobile devices, characterized by not requiring fast CPU speeds or large amounts of memory; each app runs in its own Dalvik virtual machine (each app corresponds to a Dalvik process), and its simple operation flow is as follows:
Linux Kernel: This involves low-level drivers, system services such as security, memory management, and process management
3. Summary:
This section explored the historical background and current status of Android, then briefly analyzed its system features and architecture. These conceptual aspects are worth understanding, and in the next section, we will start setting up the Android development environment!
1.1 Background and System Architecture Analysis
1.8 Project Source Analysis (Various Files, Resource Access)
- 2.5.4 Basic Usage of AutoCompleteTextView (AutoComplete Text View)
- 2.5.5 Basic Usage of ExpandableListView (Collapsible List)
- 2.5.6 Basic Usage of ViewFlipper (Flip View)
- 2.5.7 Basic Usage of Toast
- 2.5.8 Detailed Explanation of Notification (Status Bar Notification)
- 2.5.9 Detailed Explanation of AlertDialog (Dialog Box)
- 2.6.0 Basic Usage of Several Common Dialogs
- 2.6.1 Basic Usage of PopupWindow (Floating Box)
- 2.6.2 Menu
- 2.6.3 Simple Usage of ViewPager
- 2.6.4 Simple Usage of DrawerLayout (Official Side Sliding Menu)
- 3.1.1 Event Handling Mechanism Based on Listeners
- 3.2 Event Handling Mechanism Based on Callbacks
- 3.3 Analysis of Handler Message Passing Mechanism
- 3.4 TouchListener vs OnTouchEvent + Multi-touch
- 3.5 Listening for Content Changes in EditText
- 3.6 Responding to System Setting Events (Configuration Class)
- 3.7 AsyncTask Asynchronous Task
- 3.8 Gestures
- 4.1.1 Introduction to Activity
- 4.1.2 Getting Started with Activity
- 4.1.3 Advanced Activity
- 4.2.1 Introduction to Service
- 4.2.2 Advanced Service
- 4.2.3 Expert Service
- 4.3.1 Basic BroadcastReceiver
- 4.3.2 In-depth BroadcastReceiver
- 4.4.1 Introduction to ContentProvider
- 4.4.2 Further Exploration of ContentProvider — Document Provider
- 4.5.1 Basic Usage of Intent
- 4.5.2 Passing Complex Data with Intent
- 5.1 Basic Overview of Fragment
- 5.2.1 Fragment Example Analysis — Bottom Navigation Bar Implementation (Method 1)
- 5.2.2 Fragment Example Analysis — Bottom Navigation Bar Implementation (Method 2)
- 5.2.3 Fragment Example Analysis — Bottom Navigation Bar Implementation (Method 3)
- 5.2.4 Fragment Example Analysis — Bottom Navigation Bar + ViewPager Swipe to Switch Pages
- 5.2.5 Fragment Example Analysis — Simple Implementation of News (Shopping) App List Fragment
- 6.1 Data Storage and Access — File Storage and Reading
- 6.2 Data Storage and Access — SharedPreferences for Saving User Preferences
- 6.3.1 Data Storage and Access — Introduction to SQLite Database
- 6.3.2 Data Storage and Access — Further Exploration of SQLite Database
- 7.1.1 Android Network Programming: What to Learn and HTTP Protocol
- 7.1.2 Android HTTP Request Headers and Response Headers
- 7.1.3 Android HTTP Request Method: HttpURLConnection
- 7.1.4 Android HTTP Request Method: HttpClient
- 7.2.1 Android XML Data Parsing
- 7.2.2 Android JSON Data Parsing
- 7.3.1 Android File Upload
- 7.3.2 Android File Download (1)
- 7.3.3 Android File Download (2)
- 7.4 Android Calling WebService
- 7.5.1 Basic Usage of WebView (Web View)
- 7.5.2 Basic Interaction Between WebView and JavaScript
- 7.5.3 Notes on WebView After Android 4.4
- 7.5.4 WebView File Download
- 7.5.5 WebView Cache Issues
- 7.5.6 WebView Handling Error Code Information from Web Pages
- 7.6.1 Network Basics Preparation for Socket Learning
- 7.6.2 TCP Protocol-based Socket Communication (1)
- 7.6.3 TCP Protocol-based Socket Communication (2)
- 7.6.4 UDP Protocol-based Socket Communication
- 8.1.1 Summary of 13 Drawable Types in Android Part 1
- 8.1.2 Summary of 13 Drawable Types in Android Part 2
- 8.1.3 Summary of 13 Drawable Types in Android Part 3
- 8.2.1 Comprehensive Analysis of Bitmap (Bitmap) Part 1
- 8.2.2 OOM Issues Caused by Bitmap
- 8.3.1 Detailed Explanation of Three Drawing Tool Classes
- 8.3.2 Practical Examples of Drawing Classes
- 8.3.3 Paint API — MaskFilter (Mask)
- 8.3.4 Paint API — Xfermode and PorterDuff Detailed Explanation (Part 1)
- 8.3.5 Paint API — Xfermode and PorterDuff Detailed Explanation (Part 2)
- 8.3.6 Paint API — Xfermode and PorterDuff Detailed Explanation (Part 3)
- 8.3.7 Paint API — Xfermode and PorterDuff Detailed Explanation (Part 4)
- 8.3.8 Paint API — Xfermode and PorterDuff Detailed Explanation (Part 5)
- 8.3.9 Paint API — ColorFilter (Color Filter) (1/3)
- 8.3.10 Paint API - ColorFilter (Color Filter) (2-3)
- 8.3.11 Paint API - ColorFilter (Color Filter) (3-3)
- 8.3.12 Paint API - PathEffect (Path Effect)
- 8.3.13 Paint API - Shader (Image Rendering)
- 8.3.14 Paint Enum/Constants and ShadowLayer Shadow Effect
- 8.3.15 Paint API - Typeface (Font Style)
- 8.3.16 Canvas API Detailed (Part 1)
- 8.3.17 Canvas API Detailed (Part 2) Clipping Methods
- 8.3.18 Canvas API Detailed (Part 3) Matrix and drawBitmapMesh
- 8.4.1 Android Animation Collection - Frame Animation
- 8.4.2 Android Animation Collection - Tween Animation
- 8.4.3 Android Animation Collection - Property Animation - First Look
- 8.4.4 Android Animation Collection - Property Animation - Another Look
- 9.1 Using SoundPool to Play Sound Effects (Duang~)
- 9.2 MediaPlayer to Play Audio and Video
- 9.3 Using Camera to Take Photos
- 9.4 Using MediaRecord to Record Audio
- 10.1 TelephonyManager (Phone Manager)
- 10.2 SmsManager (SMS Manager)
- 10.3 AudioManager (Audio Manager)
- 10.4 Vibrator (Vibrator)
- 10.5 AlarmManager (Alarm Service)
- 10.6 PowerManager (Power Service)
- 10.7 WindowManager (Window Management Service)
- 10.8 LayoutInflater (Layout Service)
- 10.9 WallpaperManager (Wallpaper Manager)
- 10.10 Sensor Topics (1) - Introduction
- 10.11 Sensor Topics (2) - Orientation Sensor
- 10.12 Sensor Topics (3) - Accelerometer/Gyroscope Sensor
- 10.12 Sensor Topics (4) - Understanding Other Sensors
- 10.14 Android GPS Introduction
- 11.0《2015 Latest Android Basic Tutorial》Completion Celebration~
- 12.1 Android Practice: DrySister Look at Girls App (First Edition) - Project Setup and Simple Implementation
- 12.2 DrySister Look at Girls App (First Edition) - 2. Parsing Backend Data
- 12.3 DrySister Look at Girls App (First Edition) - 3. Image Loading Optimization (Writing an Image Cache Framework)
- 12.4 DrySister Look at Girls App (First Edition) - 4. Adding Data Caching (Introducing SQLite)
- 12.5 DrySister Look at Girls App (First Edition) - 5. Code Review, Adjustment, and Logging Class Writing
- 12.6 DrySister Look at Girls App (First Edition) - 6. Icon Creation, Obfuscation, Signing, APK Slimming, App Release