0% found this document useful (0 votes)
30 views5 pages

Android Notes Guna

The document provides comprehensive notes on the Android Operating System, covering its main features, architecture, and components such as Activities, Services, and Fragments. It also discusses the Android SDK, AVD, database connectivity options (SQLite and Firebase), and the complete process for developing and deploying an Android app to the Google Play Store. Key topics include UI components, layout types, permissions, and the differences between DVM and JVM.

Uploaded by

Guna
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views5 pages

Android Notes Guna

The document provides comprehensive notes on the Android Operating System, covering its main features, architecture, and components such as Activities, Services, and Fragments. It also discusses the Android SDK, AVD, database connectivity options (SQLite and Firebase), and the complete process for developing and deploying an Android app to the Google Play Store. Key topics include UI components, layout types, permissions, and the differences between DVM and JVM.

Uploaded by

Guna
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Android Operating System – Exam Notes

Prepared for: Guna

1. Main Features and Architecture of Android OS


Main Features:
• Open-source and Linux kernel based.
• Supports multitasking and multi-touch interface.
• Rich application framework for UI, notifications, activities, and services.
• Supports connectivity: Wi-Fi, Bluetooth, NFC, mobile networks, USB.
• Built-in support for multimedia (audio, video, images).
• SQLite database support for local storage.
• Security through sandboxing, permissions, and app signing.
• Supports sensors such as GPS, camera, accelerometer, gyroscope, and proximity sensor.

Android Architecture:
1. Linux Kernel: Core layer providing memory management, process management, drivers, security, and power
management.
2. Hardware Abstraction Layer (HAL): Connects hardware features (camera, Bluetooth, sensors) to
higher-level APIs.
3. Native Libraries + Android Runtime:
• Native libraries include SQLite, OpenGL, WebKit, SSL, media libraries.
• Android Runtime contains core libraries and ART/Dalvik for app execution.
4. Application Framework: Provides Activity Manager, Window Manager, Content Providers, Resource
Manager, Notification Manager, Package Manager.
5. Applications: Top layer including system apps and user-installed apps.

Short Note: Android is a layered operating system where apps use the application framework, which depends
on runtime, libraries, HAL, and Linux kernel.

2. Purpose of Android SDK, AVD, and Difference Between DVM and JVM
Android SDK (Software Development Kit):
• A set of tools used to develop Android applications.
• Includes API libraries, emulator tools, build tools, debugger, ADB, Gradle support, and documentation.
• Used for coding, testing, debugging, and packaging apps.

AVD (Android Virtual Device):


• A virtual emulator device that simulates a real Android phone/tablet on a computer.
• Used for testing apps without needing a physical device.
• Allows testing of different screen sizes, Android versions, and hardware configurations.

DVM vs JVM:
• DVM (Dalvik Virtual Machine): Designed specifically for Android (older runtime). Executes .dex files optimized
for low memory and battery usage.
• JVM (Java Virtual Machine): General-purpose virtual machine used for standard Java applications. Executes
.class or .jar files.

Key Differences:
• File format: DVM → .dex, JVM → .class/.jar
• Platform: DVM → Android, JVM → Desktop/Server Java
• Optimization: DVM → mobile optimized, JVM → general computing
• Architecture: DVM → register-based, JVM → stack-based

Note: Modern Android mainly uses ART instead of DVM, but DVM is still important for exam theory.

3. Basic UI Components and Two Commonly Used Android Layouts


Basic UI Components:
• TextView – displays text
• EditText – user input field
• Button – clickable button
• ImageView – displays images
• CheckBox – multiple selection option
• RadioButton – single selection in a group
• Spinner – dropdown list
• ListView / RecyclerView – displays list of items
• Switch / ToggleButton – ON/OFF control
• ProgressBar – shows loading progress

Common Android Layouts:


• LinearLayout
• RelativeLayout
• ConstraintLayout
• FrameLayout
• TableLayout

1. LinearLayout:
• Arranges child views in a single direction: vertical or horizontal.
• Easy to use for simple forms and buttons.
• Uses orientation property.
• Example: login form with username, password, and button vertically.

2. RelativeLayout / ConstraintLayout:
• RelativeLayout: Positions views relative to parent or other views (above, below, left, right).
• ConstraintLayout: Modern and flexible layout that positions views using constraints to parent and other views.
• Reduces nested layouts and improves performance.
• Widely used in Android Studio today.

Short Note: UI components create visible controls, while layouts define how those controls are arranged on the
screen.

4. Major Android Components and Database Connectivity (SQLite / Firebase)


Major Android Components:
1. Activity: Represents a single screen with a user interface.
2. Service: Runs background tasks without UI (e.g., music playback, downloads).
3. Broadcast Receiver: Responds to system or app broadcast messages (e.g., battery low, SMS received).
4. Content Provider: Manages and shares app data between applications.

Database Connectivity Using SQLite:


• SQLite is a lightweight local relational database built into Android.
• Used to store structured offline data inside the device.
• Usually implemented using SQLiteOpenHelper class.
• Steps:
1. Create database helper class
2. Create tables using SQL queries
3. Insert, update, delete, query data using SQLiteDatabase
4. Display results in UI

Database Connectivity Using Firebase:


• Firebase is a cloud-based backend platform by Google.
• Common databases: Realtime Database and Cloud Firestore.
• Used for online sync, authentication, storage, and real-time updates.
• Steps:
1. Create project in Firebase Console
2. Connect app to Firebase in Android Studio
3. Add Firebase dependencies in Gradle
4. Read/write data using Firebase APIs

SQLite vs Firebase:
• SQLite → local, offline, relational
• Firebase → cloud, online, real-time, scalable

5. Fragments, Location-Based Services, and Role of Permissions


Fragments:
• A Fragment is a reusable portion of UI inside an Activity.
• It has its own lifecycle but depends on the host Activity.
• Helps build flexible UIs for phones and tablets.
• Example: one Activity with multiple fragments such as menu fragment and detail fragment.

Location-Based Services (LBS):


• Services that use device location to provide useful information.
• Uses GPS, mobile network, Wi-Fi, and sensors.
• Common APIs: Fused Location Provider API, Google Maps API.
• Examples:
• Navigation apps
• Nearby places apps
• Ride booking apps
• Weather apps

Role of Permissions in Android Apps:


• Permissions protect sensitive user data and device features.
• Required for camera, microphone, contacts, location, SMS, storage, etc.
• Declared in [Link].
• Dangerous permissions must also be requested at runtime in modern Android versions.

Types of Permissions:
• Normal permissions – granted automatically
• Dangerous permissions – user must approve at runtime
Importance:
• Improves security and privacy
• Prevents unauthorized access to device resources

6. Complete Process of Developing and Deploying an Android App to Google


Play Store
Step 1: Planning
• Identify app idea, features, target users, and requirements.

Step 2: Setup Development Environment


• Install Android Studio, Android SDK, and emulator or connect physical device.

Step 3: Create New Project


• Select template (Empty Activity, etc.)
• Set app name, package name, language (Java/Kotlin), minimum SDK version.

Step 4: Design UI
• Create layouts in XML using TextView, Button, EditText, RecyclerView, etc.

Step 5: Write App Logic


• Implement Activity/Fragment code in Java or Kotlin.
• Handle user events, navigation, validation, and business logic.

Step 6: Add Database / APIs


• Use SQLite/Room for local storage or Firebase/REST APIs for online data.

Step 7: Test and Debug


• Run on emulator (AVD) or real device.
• Fix errors using Logcat, debugger, and testing tools.

Step 8: Optimize and Finalize


• Remove bugs, optimize performance, check permissions, app icon, splash screen, and app version.

Step 9: Generate Signed APK / AAB


• Build → Generate Signed Bundle/APK.
• Create keystore and sign the app.
• Preferred format for Play Store: Android App Bundle (.aab).

Step 10: Create Google Play Console Account


• Sign up on Google Play Console and pay one-time registration fee.

Step 11: Prepare Store Listing


• Add app title, short description, full description, screenshots, icon, feature graphic, category, contact email,
privacy policy URL.

Step 12: Upload App Bundle


• Upload signed .aab file to production, open testing, or internal testing track.

Step 13: Fill App Content & Policy Forms


• Content rating questionnaire
• Data safety form
• Ads declaration
• Target audience details
• Permissions disclosure if needed

Step 14: Review and Publish


• Review all sections, resolve warnings, then submit for review.
• After approval, app becomes available on Google Play Store.

Step 15: Post-Deployment Maintenance


• Monitor crashes, ratings, reviews, and analytics.
• Release updates with bug fixes and new features.

Exam Summary:
Plan → Develop → Test → Sign → Create Play Console listing → Upload AAB → Complete policy forms →
Publish → Maintain updates.

You might also like