Lecture 01: Introduction into Android.pptx

Y
Yousef AlamirMobile Applications Developer
Mobile Application
Development
Lecture 1
Introduction
Creating our first Android App
T. Yousef Alamir
01
Basic Java programming
knowledge
02 Object-oriented programming
03 Data structures (Array Lists –
Hash Maps, Etc. )
04 XML
Prerequisite
What is Android?
● Mobile operating system maintained by Google
– originally purchased from Android, Inc. in 2005
● Runs on phones, tablets, watches, TVs, ...
● Based on Java (dev language) and Linux (kernel)
● The 1#mobile OS worldwide
–and now 1#overall OS worldwide!
● Has over 1million apps published in Play Store
● Code is released as open source (periodically)
– easier to customize, license, p
Why develop for Android?
● Why not just write a website?
Android has a browser...
- better, snappier UI with a more
consistent user experience
- able to use different kinds of
widgets/controls than in a web
page
- more direct access to the device's
hardware (camera, GPS, etc.)
- users highly prefer apps over
mobile web browsing
Why not iOS?
Why not write apps for iOS, which runs on iPhones and iPads?.
- Familiar programming language (Java instead of Obj-C or Swift )
- Free developer tools (Apple charges $$$ for theirs)
- More liberated app store (can make an app and put on you phone or others’)
- Android has a larger install base
Android architecture
Android OS provides libraries for
many system features like contacts,
phone dialling, notifications, 2D/3D
graphics, database access,
security / encryption, camera, audio,
input/output,…
Android Java code is compiled into
a special ART (Dalvik previously)
binary format
Android architecture
Starting from Lolipop Android Distribution Dalvik
was completely replaced by ART ( Android Run
Time).
Why?
Because Dalvik (DVM) converts bytecode every
time you lunch a specific app. But ART converts it
just once during the installation of the app. That
makes CPU execution easier.
DVM vs ART
Lecture 01: Introduction into Android.pptx
Version issues
Check your phone's version of Android:
Settings → System → About Device → Android version
"Why wouldn't my phone have the newest Android
version? Can't I just update it?“
Several companies affect whether your device is up-to-
date:
– Google; phone manufacturer; service provider; ...
If any company in the chain doesn't want to push out an
update for your device, it can become out of date.
Android Studio
Google's official Android IDE, in v1.0 as of November 2014
– replaces previous Eclipse-based environment
– based on IntelliJ IDEA editor; free to download and use
All versions of Android Studio:
https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html
Lecture 01: Introduction into Android.pptx
Virtual Devices (AVDs)
● Allows you to run your project in an
emulator
– A software simulation of an entire
Android tablet, phone, watch
– When you click the "Run" button in
Android Studio it builds your app,
installs it on the virtual device, and
loads it
● Must set up the virtual device first in
Android Studio
● Alternative: install your app on your
actual Android device!
–Pro: the app will run faster, better test of
real execution
–Con: requires Android device, must be
plugged into dev PC
Project structure
● AndroidManifest.xml
–overall project config and settings ●
src/java.../
– source code for your Java classes
● res/... = resource files (many are XML)
– drawable/ = images
– layout/ = descriptions of GUI layout
– menu/ = overall app menu options
– values/ =constant values and arrays
– strings = localization data
– styles = general appearance styling ●
Gradle
– a build/compile management system
– build.gradle =main build config file
Android terminology
● Activity: a single screen of UI that appears in your app
– the fundamental units of GUI in an Android app
● View: items that appear onscreen in an activity
– Widget: GUI control such as a button or text field
– Layout: invisible container that manages positions/sizes of
widgets
● Event: action that occurs when user interacts with widgets
– e.g. clicks, typing, scrolling
● Action bar: a menu of common actions at top of the app
● Notification area: topmost system menu and icons
App build process
Designing a user interface
● open XML file for your layout (e.g. activity_main.xml)
● drag widgets from the left Palette to the preview image
● set their properties in the lower-right Proprieties panel
Android widgets
Set up SDK and user files
Set up SDK
Start installing and lunching Android Studio
Install Android Studio Program
Go to: PC properties > Advanced System Settings > Environment
Variables > Add new variable to the system variables called
JAVA_HOME with the value (JDK path)
Add JAVA_HOME variable
Install java development kit to your system
Install JDK
Install Android Studio
Top-down design process
● Let's start with a design of an app that we want to
create and then learn the necessary skills to build that
app.
● "Bigger Number" game:
– user is shown two numbers
– must choose which one is bigger by clicking on the appropriate button
– game pops up a brief "correct" / "incorrect" message after each guess
– get points for each correct answer (lose points for incorrect answers)
Creating a new project
Thank You
T. Yousef Alamir 2023
http://Yousef.omairtech.com
1 von 21

Recomendados

Introduction_to_android_and_android_studio von
Introduction_to_android_and_android_studioIntroduction_to_android_and_android_studio
Introduction_to_android_and_android_studioAbdul Basit
80 views23 Folien
Seminar on android app development von
Seminar on android app developmentSeminar on android app development
Seminar on android app developmentAbhishekKumar4779
106 views25 Folien
Android Application Development Using Java von
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Javaamaankhan
27.7K views54 Folien
Android studio von
Android studioAndroid studio
Android studioAndri Yabu
564 views34 Folien
Java Meetup - 12-03-15 - Android Development Workshop von
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopKasun Dananjaya Delgolla
1.2K views50 Folien
Android Development in a Nutshell von
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a NutshellAleix Solé
2.8K views17 Folien

Más contenido relacionado

Similar a Lecture 01: Introduction into Android.pptx

Os eclipse-androidwidget-pdf von
Os eclipse-androidwidget-pdfOs eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdfweerabahu
1.3K views31 Folien
Android and Jelly Beans von
Android and Jelly Beans Android and Jelly Beans
Android and Jelly Beans Nishant Arora
580 views22 Folien
Android and android phones von
Android and android phonesAndroid and android phones
Android and android phonesDennise Layague
993 views28 Folien
Synapseindia android apps application von
Synapseindia android apps applicationSynapseindia android apps application
Synapseindia android apps applicationSynapseindiappsdevelopment
198 views26 Folien
Introduction to Android von
Introduction to AndroidIntroduction to Android
Introduction to AndroidMUFIX Community
1.1K views50 Folien
Introduction to Mobile Development von
Introduction to Mobile DevelopmentIntroduction to Mobile Development
Introduction to Mobile DevelopmentPragnesh Vaghela
7K views34 Folien

Similar a Lecture 01: Introduction into Android.pptx(20)

Os eclipse-androidwidget-pdf von weerabahu
Os eclipse-androidwidget-pdfOs eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdf
weerabahu1.3K views
Android and Jelly Beans von Nishant Arora
Android and Jelly Beans Android and Jelly Beans
Android and Jelly Beans
Nishant Arora580 views
Android deep dive von AnuSahniNCI
Android deep diveAndroid deep dive
Android deep dive
AnuSahniNCI1.2K views
Android Programming made easy von Lars Vogel
Android Programming made easyAndroid Programming made easy
Android Programming made easy
Lars Vogel4.9K views
PT GTUG 1st Technical Tession - Android von drjuniornet
PT GTUG 1st Technical Tession - AndroidPT GTUG 1st Technical Tession - Android
PT GTUG 1st Technical Tession - Android
drjuniornet849 views

Último

Software evolution understanding: Automatic extraction of software identifier... von
Software evolution understanding: Automatic extraction of software identifier...Software evolution understanding: Automatic extraction of software identifier...
Software evolution understanding: Automatic extraction of software identifier...Ra'Fat Al-Msie'deen
7 views33 Folien
Roadmap y Novedades de producto von
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de productoNeo4j
50 views33 Folien
ict act 1.pptx von
ict act 1.pptxict act 1.pptx
ict act 1.pptxsanjaniarun08
13 views17 Folien
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... von
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Marc Müller
37 views83 Folien
SAP FOR TYRE INDUSTRY.pdf von
SAP FOR TYRE INDUSTRY.pdfSAP FOR TYRE INDUSTRY.pdf
SAP FOR TYRE INDUSTRY.pdfVirendra Rai, PMP
24 views3 Folien
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon von
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - AfternoonDSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - AfternoonDeltares
15 views43 Folien

Último(20)

Software evolution understanding: Automatic extraction of software identifier... von Ra'Fat Al-Msie'deen
Software evolution understanding: Automatic extraction of software identifier...Software evolution understanding: Automatic extraction of software identifier...
Software evolution understanding: Automatic extraction of software identifier...
Roadmap y Novedades de producto von Neo4j
Roadmap y Novedades de productoRoadmap y Novedades de producto
Roadmap y Novedades de producto
Neo4j50 views
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... von Marc Müller
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Marc Müller37 views
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon von Deltares
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - AfternoonDSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
DSD-INT 2023 - Delft3D User Days - Welcome - Day 3 - Afternoon
Deltares15 views
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko... von Deltares
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
Deltares12 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx von animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm13 views
DSD-INT 2023 The Danube Hazardous Substances Model - Kovacs von Deltares
DSD-INT 2023 The Danube Hazardous Substances Model - KovacsDSD-INT 2023 The Danube Hazardous Substances Model - Kovacs
DSD-INT 2023 The Danube Hazardous Substances Model - Kovacs
Deltares8 views
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge... von Deltares
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
Deltares17 views
DSD-INT 2023 Next-Generation Flood Inundation Mapping for Taiwan - Delft3D FM... von Deltares
DSD-INT 2023 Next-Generation Flood Inundation Mapping for Taiwan - Delft3D FM...DSD-INT 2023 Next-Generation Flood Inundation Mapping for Taiwan - Delft3D FM...
DSD-INT 2023 Next-Generation Flood Inundation Mapping for Taiwan - Delft3D FM...
Deltares7 views
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit... von Deltares
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...
DSD-INT 2023 FloodAdapt - A decision-support tool for compound flood risk mit...
Deltares13 views
Headless JS UG Presentation.pptx von Jack Spektor
Headless JS UG Presentation.pptxHeadless JS UG Presentation.pptx
Headless JS UG Presentation.pptx
Jack Spektor7 views
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ... von Deltares
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
Deltares10 views
Fleet Management Software in India von Fleetable
Fleet Management Software in India Fleet Management Software in India
Fleet Management Software in India
Fleetable11 views
Neo4j y GenAI von Neo4j
Neo4j y GenAI Neo4j y GenAI
Neo4j y GenAI
Neo4j45 views

Lecture 01: Introduction into Android.pptx

  • 1. Mobile Application Development Lecture 1 Introduction Creating our first Android App T. Yousef Alamir
  • 2. 01 Basic Java programming knowledge 02 Object-oriented programming 03 Data structures (Array Lists – Hash Maps, Etc. ) 04 XML Prerequisite
  • 3. What is Android? ● Mobile operating system maintained by Google – originally purchased from Android, Inc. in 2005 ● Runs on phones, tablets, watches, TVs, ... ● Based on Java (dev language) and Linux (kernel) ● The 1#mobile OS worldwide –and now 1#overall OS worldwide! ● Has over 1million apps published in Play Store ● Code is released as open source (periodically) – easier to customize, license, p
  • 4. Why develop for Android? ● Why not just write a website? Android has a browser... - better, snappier UI with a more consistent user experience - able to use different kinds of widgets/controls than in a web page - more direct access to the device's hardware (camera, GPS, etc.) - users highly prefer apps over mobile web browsing
  • 5. Why not iOS? Why not write apps for iOS, which runs on iPhones and iPads?. - Familiar programming language (Java instead of Obj-C or Swift ) - Free developer tools (Apple charges $$$ for theirs) - More liberated app store (can make an app and put on you phone or others’) - Android has a larger install base
  • 6. Android architecture Android OS provides libraries for many system features like contacts, phone dialling, notifications, 2D/3D graphics, database access, security / encryption, camera, audio, input/output,… Android Java code is compiled into a special ART (Dalvik previously) binary format
  • 7. Android architecture Starting from Lolipop Android Distribution Dalvik was completely replaced by ART ( Android Run Time). Why? Because Dalvik (DVM) converts bytecode every time you lunch a specific app. But ART converts it just once during the installation of the app. That makes CPU execution easier. DVM vs ART
  • 9. Version issues Check your phone's version of Android: Settings → System → About Device → Android version "Why wouldn't my phone have the newest Android version? Can't I just update it?“ Several companies affect whether your device is up-to- date: – Google; phone manufacturer; service provider; ... If any company in the chain doesn't want to push out an update for your device, it can become out of date.
  • 10. Android Studio Google's official Android IDE, in v1.0 as of November 2014 – replaces previous Eclipse-based environment – based on IntelliJ IDEA editor; free to download and use All versions of Android Studio: https://plugins.jetbrains.com/docs/intellij/android-studio-releases-list.html
  • 12. Virtual Devices (AVDs) ● Allows you to run your project in an emulator – A software simulation of an entire Android tablet, phone, watch – When you click the "Run" button in Android Studio it builds your app, installs it on the virtual device, and loads it ● Must set up the virtual device first in Android Studio ● Alternative: install your app on your actual Android device! –Pro: the app will run faster, better test of real execution –Con: requires Android device, must be plugged into dev PC
  • 13. Project structure ● AndroidManifest.xml –overall project config and settings ● src/java.../ – source code for your Java classes ● res/... = resource files (many are XML) – drawable/ = images – layout/ = descriptions of GUI layout – menu/ = overall app menu options – values/ =constant values and arrays – strings = localization data – styles = general appearance styling ● Gradle – a build/compile management system – build.gradle =main build config file
  • 14. Android terminology ● Activity: a single screen of UI that appears in your app – the fundamental units of GUI in an Android app ● View: items that appear onscreen in an activity – Widget: GUI control such as a button or text field – Layout: invisible container that manages positions/sizes of widgets ● Event: action that occurs when user interacts with widgets – e.g. clicks, typing, scrolling ● Action bar: a menu of common actions at top of the app ● Notification area: topmost system menu and icons
  • 16. Designing a user interface ● open XML file for your layout (e.g. activity_main.xml) ● drag widgets from the left Palette to the preview image ● set their properties in the lower-right Proprieties panel
  • 18. Set up SDK and user files Set up SDK Start installing and lunching Android Studio Install Android Studio Program Go to: PC properties > Advanced System Settings > Environment Variables > Add new variable to the system variables called JAVA_HOME with the value (JDK path) Add JAVA_HOME variable Install java development kit to your system Install JDK Install Android Studio
  • 19. Top-down design process ● Let's start with a design of an app that we want to create and then learn the necessary skills to build that app. ● "Bigger Number" game: – user is shown two numbers – must choose which one is bigger by clicking on the appropriate button – game pops up a brief "correct" / "incorrect" message after each guess – get points for each correct answer (lose points for incorrect answers)
  • 20. Creating a new project
  • 21. Thank You T. Yousef Alamir 2023 http://Yousef.omairtech.com