SlideShare a Scribd company logo
Android
Development
Kotlin
Advantages of Kotlin
Kotlin's Basics
Android Development in Kotlin Course
ASJ
Today's
Agenda
What is Kotlin ?
Kotlin is is a cross-platform, statically typed, general-
purpose programming language
OOPS + FP
It was introduced by JetBrains in 2011.
At Google I/O 2017, Google announced first-class
support for Kotlin on Android and announced Kotlin as
an official language for android development
History of Kotlin
2010 Project Started
2016 Kotlin 1.0
2017 Officially Supported Language in
Android
2019 Android Becomes Kotlin first
2020 Kotlin 1.4 Preview
Why Kotlin ?
Kotlin is designed to interoperate fully with Java,
and the JVM version of kotlin's standard library
depends on the Java class library
Google made Kotlin as first preference for developing
apps
30% less code as compared to Java
Time spent on reviews and maintenance is less
60% professional Android developers use Kotlin
Android Session.pdf
Kotlin is an programming language that combines
object-oriented programming and functional features
into a unique platform
main() function - Entry point of the kotlin application
function declaration -- > fun keyword
main() function
Variables in
Kotlin
Kotlin provides 2 types of Variables
var - mutable value
val - immutable value
Keyword
Variable
name
Data Type
Value of the variable
Control Flow
if....else Statements
The if/else statement executes a block of code if a
specified condition is true. If the condition is false,
another block of code can be executed
Control Flow
When Statement
Kotlin when can be used either as an expression or as a statement, simply like
a switch statement in Java. If it is used as an expression, the value of the first
matching branch becomes the value of the overall expression.
Loops
for Loop
a for-loop is a control flow statement for specifying iteration, which allows
code to be executed repeatedly
Loops
While Loop
The while loop loops through a block of code as long as a specified condition
is true.
Loops
do...while Loop
The do..while is similar to the while loop with a difference that the this loop
will execute the code block once, before checking if the condition is true, then
it will repeat the loop as long as the condition is true.
Functions
Kotlin is a statically typed language, hence,
functions play a great role in it.
A function is a block of code which is written
to perform a particular task.
Built - in functions
Kotlin provides a number of built-in functions, we
have used a number of buil-in functions in our
examples. For example print() and println() are the
most commonly used built-in function which we use
to print an output to the screen.
What is
Android Studio ?
Android Studio is the official Integrated Development
Environment (IDE) for android application
development.
It is built on JetBrains' IntelliJ IDEA software and
designed specifically for Android development.
It is available for download on Windows, macOS and
Linux based operating systems
Features of Android
Studio
Gradle-based build support
Template-based wizards to create common Android
designs and components
A rich layout editor that allows users to drag-and-drop UI
components, option to preview layouts on multiple screen
configurations[18]
Built-in support for Google Cloud Platform, enabling
integration with Firebase Cloud Messaging
Android Virtual Device (Emulator) to run and debug apps
in the Android studio.
Steps to Install
Android Studio
Prerequisites :
-> 64-bit Operating System(for Windows and linux)
-> Java installed on your system
-> To check
Go to command prompt and type java -version
Download Android Studio
Android Session.pdf
Android Session.pdf
Android Session.pdf
Android Session.pdf
Android Session.pdf
Android Session.pdf
Android Session.pdf
Android Session.pdf
Android Session.pdf
Menu Bar
Tool Bar
Project Window
Code Editor Window
MAIN WINDOW
OVERVIEW
New – Creates new
Android Application
Open – Opens existing
Android Application
Open Recent – Shows the
list of recently opened
projects and clicking on
one of them would open
the project.
ANDROID FILE MENU
Android Studio
Walk through
In addition to Text Editor,
Activity Layout files could be
edited using XML Design
Editor. The UI elements could
be drag and dropped to the
Layout at center.
ANDROID XML DESIGN
EDITOR
ANDROID TOOL BAR
Android Session.pdf
Android Session.pdf
Android Session.pdf
Android Session.pdf
Android Session.pdf
App components
Activities
Services
Broadcast receivers
Content providers
App components are the essential building blocks of
an Android app. Each component is an entry point
through which the system or a user can enter your
app.
There are four different types of app components:
Activity
An Activity represents a single screen with a user
interface
It deals with the UI and the user interactions to the
screen. In other words, it is a User Interface that
contains activities. These can be one or more
depending upon the App. It starts when the
application is launched.
In an android app at least one activity is always
present which is known as MainActivity.
Main Activity
XML
XML - EXTENSIBLE MARKUP LANGUAGE
XML is a markup language much like HTML used to
describe data. It is derived from Standard
Generalized Markup Language(SMGL).
XML tags define the data and used to store and
organize data. It’s easily scalable and simple to
develop. In Android, the XML is used to implement UI-
related data, and it’s a lightweight markup language
that doesn’t make layout heavy. XML only contains
tags, while implementing they need to be just
invoked.
Basic XML Syntax
Closing Tag
Opening Tag
XML Code in design
In Android Studio you can run your code either in an
physical device or in an android emulator
For running on physical device :
-> Enable Developer options in your android device
-> Enable USB debugging in developer options
-> Connect your phone to your laptop/desktop via a
USB cable
-> Run your code in your device
Run your code
The Android Emulator simulates Android devices on
your computer so that you can test your application
on a variety of devices and Android API levels without
needing to have each physical device.
The emulator provides almost all of the capabilities
of a real Android device. You can simulate incoming
phone calls and text messages, specify the location
of the device, simulate different network speeds,
simulate rotation and other hardware sensors,
access the Google Play Store, and much more.
Android Emulator
Create and manage virtual devices
Select Tools > AVD Manager.
Click AVD Manager in the toolbar.
An Android Virtual Device (AVD) is a
configuration that defines the
characteristics of an Android phone,
tablet, Wear OS, Android TV, or
Automotive OS device that you want to
simulate in the Android Emulator. The
AVD Manager is an interface you can
launch from Android Studio that helps
you create and manage AVDs.
To open the AVD Manager, do one of
the following:
Thank
You!

More Related Content

PDF
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017
PPTX
What is Kotlin Multiplaform? Why & How?
PDF
Android resources
PDF
Android Basic Components
PPTX
Flutter Intro
PPT
Android ppt
PPTX
Kotlin presentation
PDF
Embedded Android : System Development - Part IV (Android System Services)
Introduction to kotlin for android app development gdg ahmedabad dev fest 2017
What is Kotlin Multiplaform? Why & How?
Android resources
Android Basic Components
Flutter Intro
Android ppt
Kotlin presentation
Embedded Android : System Development - Part IV (Android System Services)

What's hot (20)

PDF
Cucumber ppt
PPTX
Introduction to android
PDF
Android Programming Basics
PPTX
Automated Test Framework with Cucumber
PPTX
Introduction to Selenium Web Driver
PPTX
What is Flutter
PDF
Android info session
PPT
Introduction to Android, Architecture & Components
PDF
Understaing Android EGL
PPTX
Jetpack Compose.pptx
PPTX
Android with kotlin course
PPT
Android | Android Activity Launch Modes and Tasks | Gonçalo Silva
PDF
Kotlin for Android Development
PPTX
Automation Testing by Selenium Web Driver
PPTX
Android studio ppt
PDF
Publish Android Application on Google Play Store
PPTX
Angular Unit Testing
PPTX
Objective c slide I
PPTX
androidstudio.pptx
PDF
Introduction to Android Development
Cucumber ppt
Introduction to android
Android Programming Basics
Automated Test Framework with Cucumber
Introduction to Selenium Web Driver
What is Flutter
Android info session
Introduction to Android, Architecture & Components
Understaing Android EGL
Jetpack Compose.pptx
Android with kotlin course
Android | Android Activity Launch Modes and Tasks | Gonçalo Silva
Kotlin for Android Development
Automation Testing by Selenium Web Driver
Android studio ppt
Publish Android Application on Google Play Store
Angular Unit Testing
Objective c slide I
androidstudio.pptx
Introduction to Android Development
Ad

Similar to Android Session.pdf (20)

PDF
Android study jam session 1
PDF
Android Study Jams- Hands on Experience!(Day 1)
PDF
Os eclipse-androidwidget-pdf
PPTX
Android app development ppt
PDF
Green flag Wrap up Google Solution Challenge.pdf
PPTX
Android
PPTX
2018 top ide's for andriod development
PPTX
Seminar on android app development
PPTX
android group material Presentation1.pptx
PDF
Synopsis on android application
PPTX
Android studio 4.0 new features preview
PDF
Android dev o_auth
PDF
Android study jams
PPTX
Introduction to Android- A session by Sagar Das
PPTX
Android Study Jam - Introduction
PPTX
Android application development
PPTX
Android | Xamarin | Mobile Application development
PPTX
this is PPT for mobail application development
PPTX
Introduction_to_android_and_android_studio
PPT
Creating Great Apps with MOTODEV Studio for Android
Android study jam session 1
Android Study Jams- Hands on Experience!(Day 1)
Os eclipse-androidwidget-pdf
Android app development ppt
Green flag Wrap up Google Solution Challenge.pdf
Android
2018 top ide's for andriod development
Seminar on android app development
android group material Presentation1.pptx
Synopsis on android application
Android studio 4.0 new features preview
Android dev o_auth
Android study jams
Introduction to Android- A session by Sagar Das
Android Study Jam - Introduction
Android application development
Android | Xamarin | Mobile Application development
this is PPT for mobail application development
Introduction_to_android_and_android_studio
Creating Great Apps with MOTODEV Studio for Android
Ad

Recently uploaded (20)

PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
Cell Types and Its function , kingdom of life
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
master seminar digital applications in india
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Computing-Curriculum for Schools in Ghana
PDF
Basic Mud Logging Guide for educational purpose
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
Pharma ospi slides which help in ospi learning
PPTX
Institutional Correction lecture only . . .
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
Anesthesia in Laparoscopic Surgery in India
Final Presentation General Medicine 03-08-2024.pptx
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Cell Types and Its function , kingdom of life
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
FourierSeries-QuestionsWithAnswers(Part-A).pdf
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
master seminar digital applications in india
Microbial diseases, their pathogenesis and prophylaxis
Computing-Curriculum for Schools in Ghana
Basic Mud Logging Guide for educational purpose
O5-L3 Freight Transport Ops (International) V1.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Module 4: Burden of Disease Tutorial Slides S2 2025
O7-L3 Supply Chain Operations - ICLT Program
PPH.pptx obstetrics and gynecology in nursing
TR - Agricultural Crops Production NC III.pdf
Pharma ospi slides which help in ospi learning
Institutional Correction lecture only . . .
STATICS OF THE RIGID BODIES Hibbelers.pdf

Android Session.pdf

  • 2. Kotlin Advantages of Kotlin Kotlin's Basics Android Development in Kotlin Course ASJ Today's Agenda
  • 3. What is Kotlin ? Kotlin is is a cross-platform, statically typed, general- purpose programming language OOPS + FP It was introduced by JetBrains in 2011. At Google I/O 2017, Google announced first-class support for Kotlin on Android and announced Kotlin as an official language for android development
  • 4. History of Kotlin 2010 Project Started 2016 Kotlin 1.0 2017 Officially Supported Language in Android 2019 Android Becomes Kotlin first 2020 Kotlin 1.4 Preview
  • 5. Why Kotlin ? Kotlin is designed to interoperate fully with Java, and the JVM version of kotlin's standard library depends on the Java class library Google made Kotlin as first preference for developing apps 30% less code as compared to Java Time spent on reviews and maintenance is less 60% professional Android developers use Kotlin
  • 7. Kotlin is an programming language that combines object-oriented programming and functional features into a unique platform main() function - Entry point of the kotlin application function declaration -- > fun keyword main() function
  • 8. Variables in Kotlin Kotlin provides 2 types of Variables var - mutable value val - immutable value Keyword Variable name Data Type Value of the variable
  • 9. Control Flow if....else Statements The if/else statement executes a block of code if a specified condition is true. If the condition is false, another block of code can be executed
  • 10. Control Flow When Statement Kotlin when can be used either as an expression or as a statement, simply like a switch statement in Java. If it is used as an expression, the value of the first matching branch becomes the value of the overall expression.
  • 11. Loops for Loop a for-loop is a control flow statement for specifying iteration, which allows code to be executed repeatedly
  • 12. Loops While Loop The while loop loops through a block of code as long as a specified condition is true.
  • 13. Loops do...while Loop The do..while is similar to the while loop with a difference that the this loop will execute the code block once, before checking if the condition is true, then it will repeat the loop as long as the condition is true.
  • 14. Functions Kotlin is a statically typed language, hence, functions play a great role in it. A function is a block of code which is written to perform a particular task. Built - in functions Kotlin provides a number of built-in functions, we have used a number of buil-in functions in our examples. For example print() and println() are the most commonly used built-in function which we use to print an output to the screen.
  • 15. What is Android Studio ? Android Studio is the official Integrated Development Environment (IDE) for android application development. It is built on JetBrains' IntelliJ IDEA software and designed specifically for Android development. It is available for download on Windows, macOS and Linux based operating systems
  • 16. Features of Android Studio Gradle-based build support Template-based wizards to create common Android designs and components A rich layout editor that allows users to drag-and-drop UI components, option to preview layouts on multiple screen configurations[18] Built-in support for Google Cloud Platform, enabling integration with Firebase Cloud Messaging Android Virtual Device (Emulator) to run and debug apps in the Android studio.
  • 17. Steps to Install Android Studio Prerequisites : -> 64-bit Operating System(for Windows and linux) -> Java installed on your system -> To check Go to command prompt and type java -version
  • 28. Menu Bar Tool Bar Project Window Code Editor Window MAIN WINDOW OVERVIEW New – Creates new Android Application Open – Opens existing Android Application Open Recent – Shows the list of recently opened projects and clicking on one of them would open the project. ANDROID FILE MENU Android Studio Walk through In addition to Text Editor, Activity Layout files could be edited using XML Design Editor. The UI elements could be drag and dropped to the Layout at center. ANDROID XML DESIGN EDITOR ANDROID TOOL BAR
  • 34. App components Activities Services Broadcast receivers Content providers App components are the essential building blocks of an Android app. Each component is an entry point through which the system or a user can enter your app. There are four different types of app components:
  • 35. Activity An Activity represents a single screen with a user interface It deals with the UI and the user interactions to the screen. In other words, it is a User Interface that contains activities. These can be one or more depending upon the App. It starts when the application is launched. In an android app at least one activity is always present which is known as MainActivity.
  • 37. XML XML - EXTENSIBLE MARKUP LANGUAGE XML is a markup language much like HTML used to describe data. It is derived from Standard Generalized Markup Language(SMGL). XML tags define the data and used to store and organize data. It’s easily scalable and simple to develop. In Android, the XML is used to implement UI- related data, and it’s a lightweight markup language that doesn’t make layout heavy. XML only contains tags, while implementing they need to be just invoked.
  • 38. Basic XML Syntax Closing Tag Opening Tag
  • 39. XML Code in design
  • 40. In Android Studio you can run your code either in an physical device or in an android emulator For running on physical device : -> Enable Developer options in your android device -> Enable USB debugging in developer options -> Connect your phone to your laptop/desktop via a USB cable -> Run your code in your device Run your code
  • 41. The Android Emulator simulates Android devices on your computer so that you can test your application on a variety of devices and Android API levels without needing to have each physical device. The emulator provides almost all of the capabilities of a real Android device. You can simulate incoming phone calls and text messages, specify the location of the device, simulate different network speeds, simulate rotation and other hardware sensors, access the Google Play Store, and much more. Android Emulator
  • 42. Create and manage virtual devices Select Tools > AVD Manager. Click AVD Manager in the toolbar. An Android Virtual Device (AVD) is a configuration that defines the characteristics of an Android phone, tablet, Wear OS, Android TV, or Automotive OS device that you want to simulate in the Android Emulator. The AVD Manager is an interface you can launch from Android Studio that helps you create and manage AVDs. To open the AVD Manager, do one of the following: