SlideShare a Scribd company logo
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
 
08 objective-c session 8
08  objective-c session 808  objective-c session 8
08 objective-c session 8
Amr Elghadban (AmrAngry)
 
Latest & interesting updates #android dev
Latest & interesting updates #android devLatest & interesting updates #android dev
Latest & interesting updates #android dev
Paresh 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 Dart
GDGKuwaitGoogleDevel
 
Building beautiful User Interface in Android
Building beautiful User Interface in AndroidBuilding beautiful User Interface in Android
Building beautiful User Interface in Android
Lars 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 Testing
Bitbar
 
Day 1 Android: Before Getting Started
Day 1 Android: Before Getting StartedDay 1 Android: Before Getting Started
Day 1 Android: Before Getting Started
Ahsanul Karim
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
Alberto Jr Gaudicos
 
Android Test Automation Workshop
Android Test Automation WorkshopAndroid Test Automation Workshop
Android Test Automation Workshop
Eduardo Carrara de Araujo
 
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 2
SEJALGUPTA44
 
Inside Android Testing
Inside Android TestingInside Android Testing
Inside Android Testing
Fernando 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 Developer
Sergio 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 Great
angelshcc
 
Team Structure
Team StructureTeam Structure
Team Structure
guest4308c28
 
Organizational Design for Effective Software Development
Organizational Design for Effective Software DevelopmentOrganizational Design for Effective Software Development
Organizational Design for Effective Software Development
Dev9Com
 

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 development
slidesuren
 
Part 2 android application development 101
Part 2 android application development 101Part 2 android application development 101
Part 2 android application development 101
Michael Angelo Rivera
 
Lec005 android start_program
Lec005 android start_programLec005 android start_program
Lec005 android start_program
Eyad Almasri
 
Android terminologies
Android terminologiesAndroid terminologies
Android terminologies
jerry vasoya
 
Android session 1
Android session 1Android session 1
Android session 1
Ahesanali Suthar
 
Intro to android (gdays)
Intro to android (gdays)Intro to android (gdays)
Intro to android (gdays)
Omolara Adejuwon
 
Android app development ppt
Android app development pptAndroid app development ppt
Android app development ppt
saitej15
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
Aly Abdelkareem
 
Android - Getting started with Android
Android - Getting started with Android Android - Getting started with Android
Android - Getting started with Android
Vibrant Technologies & Computers
 
Android Development project
Android Development projectAndroid Development project
Android Development project
Minhaj Kazi
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
Prof. Erwin Globio
 
Introduction to Android Development Part 1
Introduction to Android Development Part 1Introduction to Android Development Part 1
Introduction to Android Development Part 1
Kainda Kiniel Daka
 
Introduction To Android For Beginners.
Introduction To Android For Beginners.Introduction To Android For Beginners.
Introduction To Android For Beginners.
Sandeep Londhe
 
Android - Android Application Configuration
Android - Android Application ConfigurationAndroid - Android Application Configuration
Android - Android Application Configuration
Vibrant Technologies & Computers
 
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
Kasun Dananjaya Delgolla
 
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.pptUnit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
dineshkumar periyasamy
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a Nutshell
Aleix Solé
 
Mobile Application Development-Components and Layouts
Mobile Application Development-Components and LayoutsMobile Application Development-Components and Layouts
Mobile Application Development-Components and Layouts
Chandrakant Divate
 
Android application development workshop day1
Android application development workshop   day1Android application development workshop   day1
Android application development workshop day1
Borhan Otour
 
Android Intro
Android IntroAndroid Intro
Android Intro
Justin Grammens
 

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
 
Mobile Application Development-Components and Layouts
Mobile Application Development-Components and LayoutsMobile Application Development-Components and Layouts
Mobile Application Development-Components and Layouts
 
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
 

Recently uploaded

Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
Green Software Development
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
kalichargn70th171
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 

Recently uploaded (20)

Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, FactsALGIT - Assembly Line for Green IT - Numbers, Data, Facts
ALGIT - Assembly Line for Green IT - Numbers, Data, Facts
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
Why Mobile App Regression Testing is Critical for Sustained Success_ A Detail...
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 

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