Thursday, October 30, 2025

MCA 1 Android Using Kotlin - Unit 1 ( Introduction to Android IDE and Android Studio)

Prepared By : Prof. Uday Shah (HOD-IT)


Unit 1 ( Introduction to Android IDE and Android Studio)

1. Introduction. 1

2. Advantages. 2

3. Difference between Mobile, Web, and Hybrid Applications. 2

4. Introduction to Android Operating System.. 3

5. Android Versions with Features. 3

6. Android Architecture. 3

7. OHA (Open Handset Alliance) 4

8. Introduction of Android Studio. 4

9. Android SDK. 5

10. Android Development Tools. 5

11. Android Virtual Devices (AVD) 6

12. Directory Structure of Android Application. 6

13. Activity & Application Life Cycle. 6

14. Anatomy of Android Application. 7

15. Android Manifest File. 7

16. R.java File. 8

 

 

 1. Introduction

  • Android is an open-source operating system developed by Google for mobile devices such as smartphones and tablets.
  • It is based on the Linux kernel and primarily designed for touch-based devices.
  • Android provides a rich user interface, background services, and multitasking capabilities.
  • The Android platform includes tools, libraries, and APIs for developing apps.
  • Apps are mainly developed using Java or Kotlin languages.
  • It uses the Dalvik Virtual Machine (DVM) or Android Runtime (ART) for executing code.
  • Android applications are packaged as .apk (Android Package) files.
  • It allows developers to access device hardware like camera, GPS, sensors, etc.
  • Android supports third-party app installations via Google Play Store or manually.
  • Its open-source nature allows customization by device manufacturers and developers.

 2. Advantages

  • Open-source platform – freely available for modification and customization.
  • Supports a wide range of devices and hardware configurations.
  • Easy integration with Google services like Maps, Drive, Gmail, etc.
  • Large developer community with extensive documentation and libraries.
  • Provides flexibility through Android SDK for creating innovative apps.
  • Offers high performance through ART and optimized memory usage.
  • Supports background services and multitasking.
  • Regular updates enhance security and functionality.
  • Compatible with multiple screen sizes and resolutions.
  • Simple to deploy and distribute apps through Google Play Store.

 3. Difference between Mobile, Web, and Hybrid Applications

  • Mobile Apps: Installed directly on the device; developed using Java/Kotlin (Android) or Swift (iOS).
  • Web Apps: Run in web browsers using HTML, CSS, JavaScript — no installation needed.
  • Hybrid Apps: Combine both — built using web technologies but wrapped in a native shell.
  • Mobile apps can work offline, whereas web apps need internet access.
  • Web apps are platform-independent; mobile apps are OS-specific.
  • Hybrid apps use frameworks like Ionic, React Native, or Flutter.
  • Mobile apps have better performance and access to device features.
  • Web apps are easier to maintain and update.
  • Hybrid apps balance cost and performance.
  • Choice depends on project goals and target audience.

 4. Introduction to Android Operating System

  • Android OS manages hardware and software resources of the device.
  • It includes kernel, libraries, runtime, and application framework.
  • It enables user interaction through touchscreen, voice, and gestures.
  • Offers security through sandboxing and app permissions.
  • Android uses activities, services, broadcast receivers, and content providers.
  • The OS handles memory management and process control.
  • Supports background tasks and notifications.
  • Provides a consistent UI design using Material Design guidelines.
  • Allows OTA (Over The Air) updates for devices.
  • Enables connectivity through Bluetooth, Wi-Fi, and cellular networks.

 5. Android Versions with Features

  • Android started from version 1.0 to the latest Android 14 (Upside Down Cake).
  • Earlier versions were named alphabetically after desserts (Cupcake, Donut, Pie, etc.).
  • Each version introduced UI and performance improvements.
  • Android 5 (Lollipop): Introduced Material Design.
  • Android 6 (Marshmallow): Added app permissions and Doze mode.
  • Android 7–9: Enhanced notifications and multitasking.
  • Android 10–12: Improved privacy, gesture navigation, and dark mode.
  • Android 13–14: Added per-app language, better security, and energy optimization.
  • Regular updates enhance performance and compatibility.
  • Google Play services ensure backward compatibility.

 6. Android Architecture

  • Divided into four main layers:
    1. Linux Kernel – Handles hardware drivers, memory, process management.
    2. Libraries – Provides core functions (SQLite, WebKit, OpenGL, etc.).
    3. Android Runtime (ART) – Executes app code efficiently.
    4. Application Framework – Provides APIs for UI, data, and app control.
  • Applications sit at the top of the architecture.
  • Each layer interacts with the one below it.
  • Ensures modularity, reusability, and stability.
  • Architecture supports secure and scalable app development.

 7. OHA (Open Handset Alliance)

  • A consortium of Google and 80+ companies like Samsung, LG, HTC, etc.
  • Formed in 2007 to develop open standards for mobile devices.
  • Its main goal is to promote Android as an open and unified mobile platform.
  • Encourages manufacturers to use Android freely.
  • Reduces fragmentation across devices.
  • Provides shared research and technology.
  • Supports rapid innovation in mobile computing.
  • Helps maintain compatibility between hardware and software.
  • Encourages collaboration between developers, carriers, and manufacturers.
  • Resulted in the global success of Android OS.

 8. Introduction of Android Studio

  • Official IDE (Integrated Development Environment) for Android app development.
  • Developed by Google, based on IntelliJ IDEA.
  • Provides tools for writing, debugging, testing, and packaging apps.
  • Supports Gradle build system for managing dependencies.
  • Offers code completion, refactoring, and linting tools.
  • Integrated emulator for testing apps on virtual devices.
  • Real-time preview of layouts via XML editor.
  • Supports multiple languages (Java, Kotlin, C++).
  • Includes version control integration (Git, SVN).
  • Cross-platform — works on Windows, macOS, and Linux.

 9. Android SDK

  • SDK (Software Development Kit) provides tools and APIs to build Android apps.
  • Includes compiler, debugger, libraries, and sample projects.
  • Contains ADB (Android Debug Bridge) for device communication.
  • Includes Android Emulator for virtual testing.
  • Offers platform tools and system images for various Android versions.
  • Updated regularly with new APIs and security patches.
  • Works with Android Studio seamlessly.
  • Supports backward compatibility with older Android devices.
  • Essential for compiling and running apps.
  • Developers must configure SDK paths in Android Studio.

 10. Android Development Tools

  • A collection of utilities to build and manage Android projects.
  • Includes ADB, SDK Manager, AVD Manager, Lint, and Logcat.
  • ADB enables debugging and transferring data between PC and device.
  • Lint checks code for potential errors and optimizations.
  • Logcat shows runtime logs for debugging.
  • SDK Manager manages SDK versions and updates.
  • Gradle automates building and packaging processes.
  • These tools improve productivity and code quality.
  • Help monitor app performance and memory usage.
  • Provide real-time debugging support.

 11. Android Virtual Devices (AVD)

  • AVD is an emulator that mimics a real Android device on your computer.
  • Allows testing apps without physical devices.
  • Supports various screen sizes, resolutions, and Android versions.
  • Can simulate phone calls, GPS, battery levels, and sensors.
  • Created and managed through AVD Manager in Android Studio.
  • Helps detect UI and performance issues early.
  • Developers can test multiple device configurations.
  • Saves cost and time during app development.
  • Supports fast boot for quicker startup.
  • Essential for testing compatibility across devices.

 12. Directory Structure of Android Application

  • Every Android project follows a predefined folder structure.
  • manifests/ – Contains AndroidManifest.xml describing app components.
  • java/ – Stores source code files (.java or .kt).
  • res/ – Holds resources like layouts, strings, images, colors, etc.
  • drawable/ – For images and icons.
  • layout/ – XML files for UI design.
  • values/ – Contains strings.xml, colors.xml, styles.xml.
  • Gradle Scripts/ – Build configuration files.
  • Maintains organized and modular app structure.
  • Helps Android Studio build and compile efficiently.

 13. Activity & Application Life Cycle

  • Activity: Represents a single screen in an app (like MainActivity).
  • Life Cycle Methods: onCreate(), onStart(), onResume(), onPause(), onStop(), onDestroy().
  • System calls these methods automatically during state changes.
  • Application Life Cycle: Handles overall app process and memory management.
  • Proper handling prevents app crashes and data loss.
  • Developers can save or restore state using onSaveInstanceState().
  • Understanding lifecycle ensures better resource management.
  • Crucial for background tasks and navigation handling.
  • Helps maintain smooth user experience.
  • Managed by Android OS dynamically.

 14. Anatomy of Android Application

  • Every Android app consists of components: Activities, Services, Broadcast Receivers, Content Providers.
  • Activities manage UI; Services handle background operations.
  • Broadcast Receivers respond to system-wide events.
  • Content Providers manage shared data (contacts, media, etc.).
  • The Manifest file defines these components.
  • Uses resources from res directory for layouts and strings.
  • Each app runs in its own process and sandbox.
  • Uses Intents to communicate between components.
  • APK is the final packaged file for distribution.
  • Ensures modular, secure, and flexible architecture.

 15. Android Manifest File

  • Core configuration file located at app/src/main/AndroidManifest.xml.
  • Declares app components (activities, services, receivers).
  • Specifies permissions (internet, camera, storage, etc.).
  • Defines app’s package name and version.
  • Declares intent filters and app icons.
  • Helps Android OS identify entry points (like MainActivity).
  • Controls app behavior and access control.
  • Includes metadata for Google Play.
  • Must be valid XML format.
  • Any change in structure requires recompilation of the app.

 16. R.java File

  • Automatically generated file by Android build tools.
  • Acts as a bridge between Java/Kotlin code and XML resources.
  • Contains unique IDs for all resources (layout, drawable, string, etc.).
  • Located in gen/ folder of the project.
  • Developers use it to access resources via syntax like R.layout.activity_main.
  • It’s updated automatically when you add or modify resources.
  • Should not be edited manually.
  • Helps link UI elements with backend logic.
  • Ensures compile-time resource binding.
  • Critical for resource management in Android apps.

 

:: Thank You ::