SlideShare a Scribd company logo
1 of 21
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
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
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

More Related Content

Similar to Mobile App Development Lecture 1 Introduction

Os eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdfOs eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdfweerabahu
 
Android and Jelly Beans
Android and Jelly Beans Android and Jelly Beans
Android and Jelly Beans Nishant Arora
 
Android and android phones
Android and android phonesAndroid and android phones
Android and android phonesDennise Layague
 
Introduction to Mobile Development
Introduction to Mobile DevelopmentIntroduction to Mobile Development
Introduction to Mobile DevelopmentPragnesh Vaghela
 
IOS vs Android presentation by Saikrishna
IOS vs Android presentation by SaikrishnaIOS vs Android presentation by Saikrishna
IOS vs Android presentation by SaikrishnaSaikrishna Tanguturu
 
Android deep dive
Android deep diveAndroid deep dive
Android deep diveAnuSahniNCI
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easyLars Vogel
 
OS in mobile devices [Android]
OS in mobile devices [Android]OS in mobile devices [Android]
OS in mobile devices [Android]Yatharth Aggarwal
 
Creating Great Apps with MOTODEV Studio for Android
Creating Great Apps with MOTODEV Studio for AndroidCreating Great Apps with MOTODEV Studio for Android
Creating Great Apps with MOTODEV Studio for AndroidMotorola Mobility - MOTODEV
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidSwapnali Pawar
 
Android introduction
Android introductionAndroid introduction
Android introductionReena Nachare
 
PT GTUG 1st Technical Tession - Android
PT GTUG 1st Technical Tession - AndroidPT GTUG 1st Technical Tession - Android
PT GTUG 1st Technical Tession - Androiddrjuniornet
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentProf. Erwin Globio
 

Similar to Mobile App Development Lecture 1 Introduction (20)

Os eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdfOs eclipse-androidwidget-pdf
Os eclipse-androidwidget-pdf
 
Android and Jelly Beans
Android and Jelly Beans Android and Jelly Beans
Android and Jelly Beans
 
Android and android phones
Android and android phonesAndroid and android phones
Android and android phones
 
Synapseindia android apps application
Synapseindia android apps applicationSynapseindia android apps application
Synapseindia android apps application
 
Introduction to Android
Introduction to AndroidIntroduction to Android
Introduction to Android
 
Introduction to Mobile Development
Introduction to Mobile DevelopmentIntroduction to Mobile Development
Introduction to Mobile Development
 
Android mp3 player
Android mp3 playerAndroid mp3 player
Android mp3 player
 
IOS vs Android presentation by Saikrishna
IOS vs Android presentation by SaikrishnaIOS vs Android presentation by Saikrishna
IOS vs Android presentation by Saikrishna
 
Android by LAlitha
Android by LAlithaAndroid by LAlitha
Android by LAlitha
 
Android deep dive
Android deep diveAndroid deep dive
Android deep dive
 
Android Programming made easy
Android Programming made easyAndroid Programming made easy
Android Programming made easy
 
OS in mobile devices [Android]
OS in mobile devices [Android]OS in mobile devices [Android]
OS in mobile devices [Android]
 
Mobile Application Testing
Mobile Application TestingMobile Application Testing
Mobile Application Testing
 
Getting started with android studio
Getting started with android studioGetting started with android studio
Getting started with android studio
 
Creating Great Apps with MOTODEV Studio for Android
Creating Great Apps with MOTODEV Studio for AndroidCreating Great Apps with MOTODEV Studio for Android
Creating Great Apps with MOTODEV Studio for Android
 
Android tutorial1
Android tutorial1Android tutorial1
Android tutorial1
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android introduction
Android introductionAndroid introduction
Android introduction
 
PT GTUG 1st Technical Tession - Android
PT GTUG 1st Technical Tession - AndroidPT GTUG 1st Technical Tession - Android
PT GTUG 1st Technical Tession - Android
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 

Recently uploaded

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 

Recently uploaded (20)

The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 

Mobile App Development Lecture 1 Introduction

  • 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
  • 8.
  • 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
  • 11.
  • 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