Android App Development Notes

Android App Development

To get acess of the full content click DOWNLOAD

Click the DOWNLOAD button to Get all videos and notes at Rs 269

Introduction

Android is an operating system like Windows, macOS, and Ubuntu. It's used for smartphones and tablets and is owned by Google.

Android App

An Android App is a software application running on the Android platform.

Front End (UI)

Created using Jetpack Compose or XML for clear interface design.

Backend (Logic)

Responsible for logic and functionality using Kotlin, Java, or C++.

Native Android Apps

These apps are developed for one particular operating system and take full advantage of the device's features.

Evolution of Android Apps

Jetpack Compose

A modern toolkit to build UI in Android Apps. It provides an easy way to create app UIs.

It includes tools like columns, rows, and organizing elements like text and buttons.

Kotlin vs Java

Kotlin

  • Low code
  • Make apps faster
  • Detect errors at compile time
  • Easy to learn and start programming
  • Small but growing community
  • Fewer resources

Java

  • More code
  • Takes more time
  • Detects errors after execution
  • Takes more time to learn and start programming
  • Big community of experienced developers
  • Lots of resources

Kotlin BootCamp

1. Statically Typed Language

JetBrain in 2011

Statically typed language

2. Cross-Platform

Compatible with different OS: Windows, MacOS, Linux

3. Statically Typed Language

Library shelf = variable

Book Labels = Data Types

4. Variable

Space to store data of different types (Text, Numbers)

Single Data Type Variable (Whole No. = Integer Variable)

Data type determined & fixed at time of creating variable & cannot be changed later as Kotlin checks data-type in real-time

5. Type Inference

Ability to understand the type of data.

Figures out type of data in program like no need to define int a = 600;

6. Interoperability

Ability to work together smoothly

Kotlin & Java are interoperable

Kotlin developers can contribute their own lines of code in ongoing Java project

Works smoothly along other existing Java Code

IntelliJ Idea

Tools for Kotlin Programming = JDK + IDE

Java Development Kit

IDE → Make few errors while writing code

Suggest what comes next

Highlight mistakes

Gives a lot of help to them

(IntelliJ IDEA, VSCODE, ECLIPSE, NetBeans)

IntelliJ IDEA:

Code Writing, Code Execution in same environment

Code Indentation → Neat & Clean Code Organizing for easy reading

Code Reading Software Intelligence (Assist in writing & reading code)

How is Code executed in our computer?

Computer understands machine language 0 & 1 also called Binary language

Since it is difficult to write program in binary language we opt for programming languages like Kotlin, then Java

All the code written in Java Program is converted to Binary Code by Java Compiler & Java computer can understand it

This language is also called Java ByteCode

JDK + IDE = Java Compiler

Java ByteCode: Set of Instructions understood by various computer systems

But still these Java BYTECODE is not understood by computer directly

So computer takes help of a virtual machine called JAVA VIRTUAL MACHINE

JVM is already installed in our computer

Write Code → Java Compiler + JDK → Run → JVM → Output Understood by Computer

Kotlin Notes

Introduction

fun is a keyword in Kotlin, which has a predefined specific meaning as a function.

The Main Function

  • The main function is the entry point to any Kotlin program.
  • It must be present in every Kotlin program.
  • It gets automatically called while executing a Kotlin program.

Kotlin Variables

Variables store data like texts, numbers, characters, etc.

  • Defining a Variable: val age, val fullname
  • Initializing a Variable: val age = 25
  • Reinitializing a Variable: age = 30 (replacing the value)

Syntax

Keyword: val

Variable Name: Datatype = "Value"

Example: val AnundhatiRoy: String = "The God of Small Things"

val Age: Int = 30

Printing Variables

println(AnundhatiRoy)

println(Age)

Type Safety

Datatype is known to the compiler.

  • Val: Immutable (value cannot be changed)
  • Var: Mutable (can be changed)

Use cases:

  • Val: Appropriate for storing names
  • Var: Used for storing values that can change over time

Datatypes in Kotlin

  • Int: Whole numbers (like 0-9)
  • Double: Decimal numbers
  • Boolean: True/False
  • Char: 'A', '1', '♥'
  • Float: Store up to 7 decimal numbers (e.g., 3.1415926)
  • String: Sequence of Characters (for calculation)

Assignment Operator

Assignment: =

Example: A = B (add value of B to A and store in A)

Kotlin Operators

  • Arithmetic: +, -, *, /, %
  • Comparison: ==, !=, <, > <=, >=
  • Logical: && ||, !