1.9 Android Application Signing and Packaging
Category Android Basic Introduction Tutorial
Introduction:
The second to last section of Chapter One, this section introduces how to package our application into an APK file and sign it with a certificate! In the previous section, we mentioned that we will be using Android Studio as our IDE for subsequent tutorials, so this section will focus on packaging and signing projects in Android Studio (referred to as AS hereafter).
1. What is Signing and Its Purpose:
>
Android apps require a digital signature from a certificate to be installed on Android devices; otherwise, they cannot be installed. During development and testing, AS automatically signs the app with a default key and certificate. However, for actual release builds, the app does not get automatically signed, requiring manual signing. Signing your APK offers the following benefits:
-1. Application Upgrade: To allow users to seamlessly upgrade to a new version, you must use the same certificate. This is because the system only allows installation of upgraded applications if they are signed with the same certificate. If different certificates are used, the system requires the application to have a different package name, effectively treating it as a new application. For an application to be upgraded, the signing certificate and package name must remain the same!
-2. Application Modularity: Android allows multiple applications signed with the same certificate to run in the same process, treating them as a single application. This enables deploying the application in modules, allowing users to independently upgrade individual modules.
-3. Code or Data Sharing: Android provides a permission mechanism based on signatures. An application can expose its functions to another application signed with the same certificate. Signing multiple applications with the same certificate and using signature-based permission checks allow secure sharing of code and data between applications. For applications to share data or code, they must run in the same process and be signed with the same certificate. ————The above content is excerpted from: Why Android Apps Need Signing
2. How to Package and Sign in Android Studio:
Since learners of this course are beginners, we will cover multi-channel packaging later! This section only discusses the simplest method of packaging and signing. By the way, the APK generated during debugging mentioned in point 1 can be found in the directory: app/build/outputs/apk. This is different from Eclipse, which generates the APK in the bin directory.
- 3.2 Callback-Based Event Handling Mechanism
- 3.3 Analysis of Handler Message Passing Mechanism
- 3.4 TouchListener vs OnTouchEvent + Multi-Touch
- 3.5 Monitoring Content Changes in EditText
- 3.6 Responding to System Setting Events (Configuration Class)
- 3.7 AsyncTask Asynchronous Task
- 3.8 Gestures
- 4.1.1 Activity Beginner
- 4.1.2 Activity Intermediate
- 4.1.3 Activity Advanced
- 4.2.1 Service Beginner
- 4.2.2 Service Intermediate
- 4.2.3 Service Advanced
- 4.3.1 BroadcastReceiver Beginner
- 4.3.2 BroadcastReceiver Intermediate
- 4.4.1 ContentProvider Beginner
- 4.4.2 ContentProvider Intermediate - 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 Overview and HTTP Protocol Study
- 7.1.2 Study of 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 Considerations for WebView in Android 4.4 and Later
- 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 Socket Learning Network Basic Preparation
- 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/Constant Values and ShadowLayer Shadow Effect
- 8.3.15 Paint API - Typeface (Font Style)
- 8.3.16 Canvas API Detailed Explanation (Part 1)
- 8.3.17 Canvas API Detailed Explanation (Part 2) Clipping Methods Collection
- 8.3.18 Canvas API Detailed Explanation (Part 3) Matrix and drawBitmapMesh
- 8.4.1 Frame Animation in Android Animation Collection
- 8.4.2 Tween Animation in Android Animation Collection
- 8.4.3 Introduction to Property Animation in Android
- 8.4.4 Property Animation in Android - Revisited
- 9.1 Playing Sound Effects with SoundPool (Duang~)
- 9.2 MediaPlayer for Audio and Video Playback
- 9.3 Using Camera for Photography
- 9.4 Recording Audio with MediaRecord
- 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 Series (1) - Introduction
- 10.11 Sensor Series (2) - Orientation Sensor
- 10.12 Sensor Series (3) - Accelerometer/Gyroscope Sensor
- 10.12 Sensor Series (4) - Understanding Other Sensors
- 10.14 Introduction to Android GPS
- 11.0 Completion of the 2015 Latest Android Basic Tutorial
- 12.1 Android Practice: DrySister App (Version 1) - Project Setup and Basic Implementation
- 12.2 DrySister App (Version 1) - Parsing Backend Data
- 12.3 DrySister App (Version 1) - Image Loading Optimization (Building a Simple Image Cache Framework)
- 12.4 DrySister App (Version 1) - Adding Data Caching (Introducing SQLite)
- 12.5 DrySister App (Version 1) - Code Review, Adjustments, and Logging Class Writing
- 12.6 DrySister App (Version 1) - Icon Creation, Obfuscation, Signing, APK Slimming, and App Release