SlideShare a Scribd company logo
1 of 19
Android App Development
Lesson 1 - Introduction & App Structure
Prerequisities
These concepts should all be (VERY?!) familiar :
- Arrays of basic objects and types
- Use and characteristics of ArrayList
- Polymorphism.
- Overriding of methods (e.g. toString())
- Wrapper Classes - Integer, String, Double etc.
Android - Why ?
● Android (from Google) will be our platform of choice.
● Approaching 1 BILLION Android enabled devices
currently in the world (September 2014)
● Currently has 51% of the world’s smartphone market
share
● The types of devices (cars, fridges etc etc) are growing
all the time.
Android - History
● Originally started in 2005 and bought by Google in 2007.
● Google then started the OHA (Open Handset Alliance) with
the idea of standardizing mobile software platform across
vendors (Samsung, HTC, Motorola etc etc)
● Currently on version 4.4 (nickname ‘Kit Kat’), previous
4.1, 4.2 & 4.3 were nicknamed ‘Jelly Bean’
● Alphabetically ordered sweet treats!
The Basics
● We’ll be using Android as our platform of choice.
● Android apps are written in Java. So we need basic
Java installed :)! For this course we’ll use Java 8
(latest)
● We also need Android SDK (extra on top of Java)
● We’ll be using Android Studio as our development tool
of choice. Can also use Eclipse ADT (can be moved to
Android Studio later)
Logic
Data
Persistence
VIEW
CONTROLLER
MODEL
DATABASE / FILE
Graphical User
Interface (GUI)
Persistence
Common Design
Pattern
Development Environment
Android Studio
(User interface for developing Java Application)
https://developer.android.com/sdk/installing/studio.html
Java 8
(Normal Java)
http://www.oracle.com/technetwo
rk/java/javase/downloads/jdk8-
downloads-2133151.html
Android SDK
● Android Java Classes
● SDK Manager
● AVD Manager (for creating emulators)
Using Android Studio
● We could use Eclipse but it’s no longer in active
development.
● Android Studio is what Google are moving towards.
Currently at release candidaate level.
● When we create an App project in Android Studio or
Eclipse we see alot of stuff that “just gets created”.
So what are the basic key parts ?
...
Java Code
Manifest File
Resources (e.g.
Images)
Activites
● The basic building block of an app is an Activity.
● An Activity Java class that we write will ultimately
extend from android.app.Activity
● You can think of an Activity as a self-contained
“screen” of your app.
● Each Activity also has a corresponding layout file
(written in XML) - More later.
Resources
The very basic types of
resources you would
have would be :
● Images (different resolutions)
● Layout files for each Activity
(these are XML files)
● Strings, Styles and
Dimensions of components.
Activity Layouts
● Each Activity Java class has a corresponding layout
file (written in XML).
● Exists in the layout directory of resources.
● Can use the designer to generate this XML for us.
● Can also do it similar to how we did it in Swing, but
less popular in general (ViewGroups)
The Manifest File
● Every Android app must have an
AndroidManifest.xml file which is the “glue”
that brings everything together to form an app.
● It names the package for the Android
application
package="com.example.simon.myfirstapp"
● Also says which code files (including Java) are
behind each screen (Activity) in the app.
Start of the Manifest File
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
These are the icon, label and theme
of your app and are picked up from
the Resources (res directory)
@style automatically links to
res/values/styles.xml
@string automatically links to
res/values/strings.xml
@drawable
automatically links to
the relevant
res/drawable
directory
android:label
android:icon
The font, colour, style, spacing
(i.e. “The look”) of the app is
controlled by
android:style
(in this case AppTheme in style.xml)
This is where your Activity runs.
Here we see MainActivity.java
Activities in Manifest File
● Activities must also be defined in the manifest
file.
<activity
android:name=".MyActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Reference to the
Java file where the
Activity is
implemented.
What is <intent-filter> ?
● As previously mentioned each Activity is
capable of being launched as a “self-contained”
unit.
● An <intent-filter> defines where an Activity
can be launched from. (i.e. Where you “intend” it to
be launched from)
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
The <action> element specifies that this is the "main" entry
point to the application. (Like main in regular Java)
The <category> element specifies that this activity should be
listed in the system's application launcher (to allow users to
launch this activity).
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
A First Basic App
Key Parts of an Android App are :
Activity (Java) / Activity Layout (XML)
Manifest
Resource Directories
Next Week :
Activity Lifecycle & GUI Event Handling

More Related Content

What's hot

Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)danielputerman
 
Latest & interesting updates #android dev
Latest & interesting updates #android devLatest & interesting updates #android dev
Latest & interesting updates #android devParesh Mayani
 
#Code2Create:: Introduction to App Development in Flutter with Dart
#Code2Create:: Introduction to App Development in Flutter with Dart#Code2Create:: Introduction to App Development in Flutter with Dart
#Code2Create:: Introduction to App Development in Flutter with DartGDGKuwaitGoogleDevel
 
Building beautiful User Interface in Android
Building beautiful User Interface in AndroidBuilding beautiful User Interface in Android
Building beautiful User Interface in AndroidLars Vogel
 
Getting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingGetting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingBitbar
 
Day 1 Android: Before Getting Started
Day 1 Android: Before Getting StartedDay 1 Android: Before Getting Started
Day 1 Android: Before Getting StartedAhsanul Karim
 
XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University Shashikant Jagtap
 
Flutter Festivals IIT Goa Session 2
Flutter Festivals IIT Goa Session 2Flutter Festivals IIT Goa Session 2
Flutter Festivals IIT Goa Session 2SEJALGUPTA44
 
Inside Android Testing
Inside Android TestingInside Android Testing
Inside Android TestingFernando Cejas
 

What's hot (12)

Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)Appium overview (Selenium Israel #2, Feb. 2014)
Appium overview (Selenium Israel #2, Feb. 2014)
 
08 objective-c session 8
08  objective-c session 808  objective-c session 8
08 objective-c session 8
 
Latest & interesting updates #android dev
Latest & interesting updates #android devLatest & interesting updates #android dev
Latest & interesting updates #android dev
 
#Code2Create:: Introduction to App Development in Flutter with Dart
#Code2Create:: Introduction to App Development in Flutter with Dart#Code2Create:: Introduction to App Development in Flutter with Dart
#Code2Create:: Introduction to App Development in Flutter with Dart
 
Building beautiful User Interface in Android
Building beautiful User Interface in AndroidBuilding beautiful User Interface in Android
Building beautiful User Interface in Android
 
Getting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App TestingGetting Started with XCTest and XCUITest for iOS App Testing
Getting Started with XCTest and XCUITest for iOS App Testing
 
Day 1 Android: Before Getting Started
Day 1 Android: Before Getting StartedDay 1 Android: Before Getting Started
Day 1 Android: Before Getting Started
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android Test Automation Workshop
Android Test Automation WorkshopAndroid Test Automation Workshop
Android Test Automation Workshop
 
XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University
 
Flutter Festivals IIT Goa Session 2
Flutter Festivals IIT Goa Session 2Flutter Festivals IIT Goa Session 2
Flutter Festivals IIT Goa Session 2
 
Inside Android Testing
Inside Android TestingInside Android Testing
Inside Android Testing
 

Viewers also liked

Grids and Visual hierarchy for developers
Grids and Visual hierarchy for developers Grids and Visual hierarchy for developers
Grids and Visual hierarchy for developers Ruben Goncalves
 
Portfolio Web Developer
Portfolio Web DeveloperPortfolio Web Developer
Portfolio Web DeveloperSergio Enrique
 
App developer as a Web developer (ROROSyd - Jul 15)
App developer as a Web developer (ROROSyd - Jul 15)App developer as a Web developer (ROROSyd - Jul 15)
App developer as a Web developer (ROROSyd - Jul 15)Sameera Gayan
 
Being Truly Great
Being Truly GreatBeing Truly Great
Being Truly Greatangelshcc
 
Organizational Design for Effective Software Development
Organizational Design for Effective Software DevelopmentOrganizational Design for Effective Software Development
Organizational Design for Effective Software DevelopmentDev9Com
 

Viewers also liked (6)

Grids and Visual hierarchy for developers
Grids and Visual hierarchy for developers Grids and Visual hierarchy for developers
Grids and Visual hierarchy for developers
 
Portfolio Web Developer
Portfolio Web DeveloperPortfolio Web Developer
Portfolio Web Developer
 
App developer as a Web developer (ROROSyd - Jul 15)
App developer as a Web developer (ROROSyd - Jul 15)App developer as a Web developer (ROROSyd - Jul 15)
App developer as a Web developer (ROROSyd - Jul 15)
 
Being Truly Great
Being Truly GreatBeing Truly Great
Being Truly Great
 
Team Structure
Team StructureTeam Structure
Team Structure
 
Organizational Design for Effective Software Development
Organizational Design for Effective Software DevelopmentOrganizational Design for Effective Software Development
Organizational Design for Effective Software Development
 

Similar to Introduction & App Structure

Android application development
Android application developmentAndroid application development
Android application developmentslidesuren
 
Part 2 android application development 101
Part 2 android application development 101Part 2 android application development 101
Part 2 android application development 101Michael Angelo Rivera
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_programEyad Almasri
 
Android terminologies
Android terminologiesAndroid terminologies
Android terminologiesjerry vasoya
 
Android app development ppt
Android app development pptAndroid app development ppt
Android app development pptsaitej15
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentAly Abdelkareem
 
Android Development project
Android Development projectAndroid Development project
Android Development projectMinhaj Kazi
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentProf. Erwin Globio
 
Introduction to Android Development Part 1
Introduction to Android Development Part 1Introduction to Android Development Part 1
Introduction to Android Development Part 1Kainda Kiniel Daka
 
Introduction To Android For Beginners.
Introduction To Android For Beginners.Introduction To Android For Beginners.
Introduction To Android For Beginners.Sandeep Londhe
 
Java Meetup - 12-03-15 - Android Development Workshop
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
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a NutshellAleix Solé
 
Android application development workshop day1
Android application development workshop   day1Android application development workshop   day1
Android application development workshop day1Borhan Otour
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Javaamaankhan
 

Similar to Introduction & App Structure (20)

Android application development
Android application developmentAndroid application development
Android application development
 
Part 2 android application development 101
Part 2 android application development 101Part 2 android application development 101
Part 2 android application development 101
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_program
 
Android terminologies
Android terminologiesAndroid terminologies
Android terminologies
 
Android session 1
Android session 1Android session 1
Android session 1
 
Intro to android (gdays)
Intro to android (gdays)Intro to android (gdays)
Intro to android (gdays)
 
Android app development ppt
Android app development pptAndroid app development ppt
Android app development ppt
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Android - Getting started with Android
Android - Getting started with Android Android - Getting started with Android
Android - Getting started with Android
 
Android Development project
Android Development projectAndroid Development project
Android Development project
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
Introduction to Android Development Part 1
Introduction to Android Development Part 1Introduction to Android Development Part 1
Introduction to Android Development Part 1
 
Introduction To Android For Beginners.
Introduction To Android For Beginners.Introduction To Android For Beginners.
Introduction To Android For Beginners.
 
Android - Android Application Configuration
Android - Android Application ConfigurationAndroid - Android Application Configuration
Android - Android Application Configuration
 
Java Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development WorkshopJava Meetup - 12-03-15 - Android Development Workshop
Java Meetup - 12-03-15 - Android Development Workshop
 
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.pptUnit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a Nutshell
 
Android application development workshop day1
Android application development workshop   day1Android application development workshop   day1
Android application development workshop day1
 
Android Intro
Android IntroAndroid Intro
Android Intro
 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
 

Recently uploaded

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
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
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
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
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
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
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 

Recently uploaded (20)

W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
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 ...
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
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
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
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
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 

Introduction & App Structure

  • 1. Android App Development Lesson 1 - Introduction & App Structure
  • 2. Prerequisities These concepts should all be (VERY?!) familiar : - Arrays of basic objects and types - Use and characteristics of ArrayList - Polymorphism. - Overriding of methods (e.g. toString()) - Wrapper Classes - Integer, String, Double etc.
  • 3. Android - Why ? ● Android (from Google) will be our platform of choice. ● Approaching 1 BILLION Android enabled devices currently in the world (September 2014) ● Currently has 51% of the world’s smartphone market share ● The types of devices (cars, fridges etc etc) are growing all the time.
  • 4. Android - History ● Originally started in 2005 and bought by Google in 2007. ● Google then started the OHA (Open Handset Alliance) with the idea of standardizing mobile software platform across vendors (Samsung, HTC, Motorola etc etc) ● Currently on version 4.4 (nickname ‘Kit Kat’), previous 4.1, 4.2 & 4.3 were nicknamed ‘Jelly Bean’ ● Alphabetically ordered sweet treats!
  • 5. The Basics ● We’ll be using Android as our platform of choice. ● Android apps are written in Java. So we need basic Java installed :)! For this course we’ll use Java 8 (latest) ● We also need Android SDK (extra on top of Java) ● We’ll be using Android Studio as our development tool of choice. Can also use Eclipse ADT (can be moved to Android Studio later)
  • 6. Logic Data Persistence VIEW CONTROLLER MODEL DATABASE / FILE Graphical User Interface (GUI) Persistence Common Design Pattern
  • 7. Development Environment Android Studio (User interface for developing Java Application) https://developer.android.com/sdk/installing/studio.html Java 8 (Normal Java) http://www.oracle.com/technetwo rk/java/javase/downloads/jdk8- downloads-2133151.html Android SDK ● Android Java Classes ● SDK Manager ● AVD Manager (for creating emulators)
  • 8. Using Android Studio ● We could use Eclipse but it’s no longer in active development. ● Android Studio is what Google are moving towards. Currently at release candidaate level. ● When we create an App project in Android Studio or Eclipse we see alot of stuff that “just gets created”. So what are the basic key parts ?
  • 10. Activites ● The basic building block of an app is an Activity. ● An Activity Java class that we write will ultimately extend from android.app.Activity ● You can think of an Activity as a self-contained “screen” of your app. ● Each Activity also has a corresponding layout file (written in XML) - More later.
  • 11. Resources The very basic types of resources you would have would be : ● Images (different resolutions) ● Layout files for each Activity (these are XML files) ● Strings, Styles and Dimensions of components.
  • 12. Activity Layouts ● Each Activity Java class has a corresponding layout file (written in XML). ● Exists in the layout directory of resources. ● Can use the designer to generate this XML for us. ● Can also do it similar to how we did it in Swing, but less popular in general (ViewGroups)
  • 13. The Manifest File ● Every Android app must have an AndroidManifest.xml file which is the “glue” that brings everything together to form an app. ● It names the package for the Android application package="com.example.simon.myfirstapp" ● Also says which code files (including Java) are behind each screen (Activity) in the app.
  • 14. Start of the Manifest File <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > These are the icon, label and theme of your app and are picked up from the Resources (res directory) @style automatically links to res/values/styles.xml @string automatically links to res/values/strings.xml @drawable automatically links to the relevant res/drawable directory
  • 15. android:label android:icon The font, colour, style, spacing (i.e. “The look”) of the app is controlled by android:style (in this case AppTheme in style.xml) This is where your Activity runs. Here we see MainActivity.java
  • 16. Activities in Manifest File ● Activities must also be defined in the manifest file. <activity android:name=".MyActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> Reference to the Java file where the Activity is implemented.
  • 17. What is <intent-filter> ? ● As previously mentioned each Activity is capable of being launched as a “self-contained” unit. ● An <intent-filter> defines where an Activity can be launched from. (i.e. Where you “intend” it to be launched from) <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter>
  • 18. <intent-filter> The <action> element specifies that this is the "main" entry point to the application. (Like main in regular Java) The <category> element specifies that this activity should be listed in the system's application launcher (to allow users to launch this activity). <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter>
  • 19. A First Basic App Key Parts of an Android App are : Activity (Java) / Activity Layout (XML) Manifest Resource Directories Next Week : Activity Lifecycle & GUI Event Handling