SlideShare a Scribd company logo
1 of 30
INTRODUCTION TO ANDROID DEVELOPMENT
Adejuwon Omolara
Twitter: @_larikraun
Email: larryade92@gmail.com
Overview
ā€¢ Android is a software stack for mobile devices that includes an
operating system, middleware and key applications.
ā€¢ Android OS is divided into five sections
ā€¢ Applications: This is where applications to be installed are written. E.g. Games,
Browser etc.
ā€¢ Application Framework: This layer provides many higher-level services to
applications in the form of Java classes.
ā€¢ Android Runtime: This section provides a key component called Dalvik Virtual
Machine. Dalvik VM enables every android application to run in its own process, with
its own instance of the Dalvik VM. Dalvik VM is optimised to run on slow CPU, low
RAM, low power devices. It runs .dex files and not .class nor .jar
ā€¢ Libraries: e.g. SQLite database, repository for storage and sharing of application.
ā€¢ Linux Kernel : it provides basic system functionality e.g. process management,
device management etc.
Platform Overview
Android has evolved over the years :
ā€¢ Android 1.1 *Not relevant in the ecosystem*
ā€¢ Android 1.5 Cupcake *Not relevant in the ecosystem*
ā€¢ Android 1.6 Donut *Not relevant in the ecosystem*
ā€¢ Android 2.0/2.1 Eclair *Not relevant in the ecosystem*
ā€¢ Android 2.2.x Froyo *Not too relevant in the ecosystem*
ā€¢ Android 2.3.x Gingerbread *Still somewhat relevant in the ecosystem*
ā€¢ Android 3. x Honeycomb *Not relevant in the ecosystem*
ā€¢ Android 4.0.x Ice Cream Sandwich *Still quite relevant in the ecosystem*
ā€¢ Android 4.1, 4.2, 4.3 Jelly Bean *Very relevant in the ecosystem*
ā€¢ Android 4.4 KitKat *Very relevant in the ecosystem*
ā€¢ Android 5.0 Lollipop * Gaining relevance in the ecosystem*
And now we have Lollipopā€¦
Tools you need to get startedā€¦
ā€¢ A fair knowledge of Java
ā€¢ Latest Java Development Kit (JDK) : Android Apps are
developed using Java.
http://www.oracle.com/technetwork/java/javase/downloads/inde
x.html
ā€¢ Eclipse Integrated Development Environment (IDE)
https://www.eclipse.org/downloads/ or any other suitable IDE.
ā€¢ Android SDK
http://developer.android.com
ā€¢ ADT Tools for Eclipse (via Internet)
http://developer.android.com/sdk/index.html
ā€¢ Android Virtual Device (AVD) or an android mobile device.
Application Components
Applications use four main components:
ā€¢ Activity
ā€¢ Service
ā€¢ Broadcast Receivers
ā€¢ Content Providers
Activity
Activities: A single screen that is visible to user. They dictate the UI and
handle the user interaction to the smartphone screen.
public class MainActivity extends Activity {
}
Activity Lifecycle
Services
Services: They handle background processes associated with an
application. They can be used to update an application when itā€™s not
active.
public class MyService extends Service {
}
Service Lifecycle
Broadcast Receiver
Broadcast Receivers: They handle communication between Android OS
and applications. They listen for android system events.
public class MyReceiver extends BroadcastReceiver {
}
Content Providers
Content Providers: They handle and manage data, usually stored in
database and data access for queries.
public class MyContentProvider extends ContentProvider {
}
More Componentsā€¦
ā€¢ Fragments: Represents a behaviour or a portion of user
interface.
ā€¢ Views: UI elements that are drawn onscreen. They are
responsible for event handling e.g. ContextMenu, Menu etc.
ā€¢ Widgets: They are more advanced UI elements e.g Button,
CheckBox, ImageView etc.
ā€¢ Layouts: View hierarchies that control screen format and
appearance of the views.
ā€¢ Intents: Messages wiring components together. An intent
is composed of an action it needs to perform. They are
used to start activities and to communicate among various
parts of the android system.
ā€¢ Resources: External elements such as strings, drawables
and constants
ā€¢ Manifest: Configuration file for the application.
Layout Manager
It is responsible for the layout of itself and its child Views.
Android supports different default layout managers. To get
a desired layout, there are some few terms you would
come across.
ļƒ¼android:layout_width defines the width of the widget.
ļƒ¼android:layout_heigth defines the height of the widget.
ļƒ¼match_parent tells the application to maximize the
widget in its parent.
ļƒ¼wrap_content tells the layout to allocate the minimum
amount so that the widget is rendered correctly.
Image source: vogella
Who doesnā€™t like easy tasks? Well, I doā€¦
Google exposes a number of functionalities in android. To
create spectacular apps, you should make use of them.
ā€¢ Touchscreen
ā€¢ GPS
ā€¢ Accelerometer
ā€¢ Internet
ā€¢ Audio and Video support
ā€¢ Contacts
ā€¢ Security
ā€¢ Google APIs
API levels
This is an integer value that uniquely identifies the
framework API revision offered by a version of the android
platform.
ļƒ¼It lets the android platform describe the maximum
framework API revision that it supports.
ļƒ¼It lets applications describe the framework API revision
that they require.
ļƒ¼It lets the system negotiate the installation of applications
on the userā€™s device such that version-incompatible are
not installed.
You can catch more gist on API levels here
Image source: Androidā€™s site
My One-Dollar
To write a working android application, you need to
consider keeping it simple. Nobody likes a complex-for-
nothing application. I encourage drawing mock-ups ( a
visual representation of how you want the application to
look like), flow charts ( a step-by-step approach to
achieving your goal) as one of the first steps before
jumping on your IDE.
You will need to step up your UI/UX game to ā€˜wowā€™ your
users.
I think these will help too
ā€¢ Make Google your friend
ā€¢ Get familiar with android developersā€™ site
ā€¢ Read documentations before using any API
ā€¢ Join forums that will help. One of the most popular is
stackoverflow
ā€¢ Get close to the ā€˜gurusā€™- they have a lot to offer.
ā€¢ Read books that will help.
My ā€˜Hello Worldā€™Application
This is a dummy application that just displays ā€˜Hello World,
MyFirstAppā€™
ļƒ¼ MyFirstApp.java + main.xml =
MyFirstApp.java
The main.xml file
AndroidManifest.xml
ļƒ¼ package attribute defines the base package for the Java objects referred to in
a particular file.
ļƒ¼ android:versionCode must be an integer. You typically start from ā€˜1ā€™ and
increase the value by one if you roll-out a new version of your application.
ļƒ¼ android:versionName is what the users see. It can be any string.
ļƒ¼ android:minSdkVersion defines the minimum version of android your
applicaton works on. A user cannot install your application on a device with a
lower API level than specified in this attribute.
ļƒ¼ android:targetSdkVersion specifies the version on which you tested and
developed. It is a good practice to always set this to the latest Android API
version.
ļƒ¼ <application> section is a container for declaring android components.
ļƒ¼ <activity> tag defines an activity component.
ļƒ¼ android:name="android.intent.action.MAIN" can be started and the category
ļƒ¼ android:name="android.intent.category.LAUNCHERā€œ parameter tells the
Android system to add the activity to the launcher.
Questions???

More Related Content

What's hot

PROTOTYPE APPLICATION IN ANDROID PLATFORM FOR SYSTEM ADMINISTRATION OF HPC CL...
PROTOTYPE APPLICATION IN ANDROID PLATFORM FOR SYSTEM ADMINISTRATION OF HPC CL...PROTOTYPE APPLICATION IN ANDROID PLATFORM FOR SYSTEM ADMINISTRATION OF HPC CL...
PROTOTYPE APPLICATION IN ANDROID PLATFORM FOR SYSTEM ADMINISTRATION OF HPC CL...IJITCA Journal
Ā 
Mainframe APIs and Modern DevOps
Mainframe APIs and Modern DevOpsMainframe APIs and Modern DevOps
Mainframe APIs and Modern DevOpsDevOps.com
Ā 
Using GitHub and Visual Studio Code for Mainframe Development
Using GitHub and Visual Studio Code for Mainframe DevelopmentUsing GitHub and Visual Studio Code for Mainframe Development
Using GitHub and Visual Studio Code for Mainframe DevelopmentDevOps.com
Ā 
Transforming CI/CD at ABN AMRO to Accelerate Software Delivery and Improve Se...
Transforming CI/CD at ABN AMRO to Accelerate Software Delivery and Improve Se...Transforming CI/CD at ABN AMRO to Accelerate Software Delivery and Improve Se...
Transforming CI/CD at ABN AMRO to Accelerate Software Delivery and Improve Se...DevOps.com
Ā 
PT Application Inspector SSDL Edition product brief
PT Application Inspector SSDL Edition product briefPT Application Inspector SSDL Edition product brief
PT Application Inspector SSDL Edition product briefValery Boronin
Ā 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineeringtanni821216
Ā 
Practical operability techniques for teams - Matthew Skelton - Conflux - Cont...
Practical operability techniques for teams - Matthew Skelton - Conflux - Cont...Practical operability techniques for teams - Matthew Skelton - Conflux - Cont...
Practical operability techniques for teams - Matthew Skelton - Conflux - Cont...Matthew Skelton
Ā 
Intel IT Experts Tour Cyber Security - Matthew Rosenquist 2013
Intel IT Experts Tour   Cyber Security - Matthew Rosenquist 2013Intel IT Experts Tour   Cyber Security - Matthew Rosenquist 2013
Intel IT Experts Tour Cyber Security - Matthew Rosenquist 2013Matthew Rosenquist
Ā 
1. ch 1-introduction
1. ch 1-introduction1. ch 1-introduction
1. ch 1-introductionDelowar hossain
Ā 
Engineering Software Products: 1. software products
Engineering Software Products: 1. software productsEngineering Software Products: 1. software products
Engineering Software Products: 1. software productssoftware-engineering-book
Ā 
Veritas Resiliency Platform
Veritas Resiliency PlatformVeritas Resiliency Platform
Veritas Resiliency PlatformSymantec
Ā 
Usability Challenges in Cutting-edge Medical Devices and Exoskeleton Robotics
Usability Challenges in Cutting-edge Medical Devices and Exoskeleton RoboticsUsability Challenges in Cutting-edge Medical Devices and Exoskeleton Robotics
Usability Challenges in Cutting-edge Medical Devices and Exoskeleton RoboticsICS
Ā 
Application security meetup k8_s security with zero trust_29072021
Application security meetup k8_s security with zero trust_29072021Application security meetup k8_s security with zero trust_29072021
Application security meetup k8_s security with zero trust_29072021lior mazor
Ā 
Migrate from BigFix to Ivanti
Migrate from BigFix to IvantiMigrate from BigFix to Ivanti
Migrate from BigFix to IvantiIvanti
Ā 
Ch1 introduction
Ch1 introductionCh1 introduction
Ch1 introductionAlok Chaudhary
Ā 
Techniques for Developing Systems in IT Management System
Techniques for Developing Systems in IT Management SystemTechniques for Developing Systems in IT Management System
Techniques for Developing Systems in IT Management SystemGruppo Banca Sella
Ā 
Fundamentals of Computing Chapter 7
Fundamentals of Computing Chapter 7Fundamentals of Computing Chapter 7
Fundamentals of Computing Chapter 7Mohd Harris Ahmad Jaal
Ā 
Secure Delivery Center, Eclipse Open Source
Secure Delivery Center, Eclipse Open SourceSecure Delivery Center, Eclipse Open Source
Secure Delivery Center, Eclipse Open SourceGenuitec, LLC
Ā 

What's hot (20)

PROTOTYPE APPLICATION IN ANDROID PLATFORM FOR SYSTEM ADMINISTRATION OF HPC CL...
PROTOTYPE APPLICATION IN ANDROID PLATFORM FOR SYSTEM ADMINISTRATION OF HPC CL...PROTOTYPE APPLICATION IN ANDROID PLATFORM FOR SYSTEM ADMINISTRATION OF HPC CL...
PROTOTYPE APPLICATION IN ANDROID PLATFORM FOR SYSTEM ADMINISTRATION OF HPC CL...
Ā 
Mainframe APIs and Modern DevOps
Mainframe APIs and Modern DevOpsMainframe APIs and Modern DevOps
Mainframe APIs and Modern DevOps
Ā 
Using GitHub and Visual Studio Code for Mainframe Development
Using GitHub and Visual Studio Code for Mainframe DevelopmentUsing GitHub and Visual Studio Code for Mainframe Development
Using GitHub and Visual Studio Code for Mainframe Development
Ā 
Transforming CI/CD at ABN AMRO to Accelerate Software Delivery and Improve Se...
Transforming CI/CD at ABN AMRO to Accelerate Software Delivery and Improve Se...Transforming CI/CD at ABN AMRO to Accelerate Software Delivery and Improve Se...
Transforming CI/CD at ABN AMRO to Accelerate Software Delivery and Improve Se...
Ā 
PT Application Inspector SSDL Edition product brief
PT Application Inspector SSDL Edition product briefPT Application Inspector SSDL Edition product brief
PT Application Inspector SSDL Edition product brief
Ā 
Ch1
Ch1Ch1
Ch1
Ā 
Software Engineering
Software EngineeringSoftware Engineering
Software Engineering
Ā 
Practical operability techniques for teams - Matthew Skelton - Conflux - Cont...
Practical operability techniques for teams - Matthew Skelton - Conflux - Cont...Practical operability techniques for teams - Matthew Skelton - Conflux - Cont...
Practical operability techniques for teams - Matthew Skelton - Conflux - Cont...
Ā 
Intel IT Experts Tour Cyber Security - Matthew Rosenquist 2013
Intel IT Experts Tour   Cyber Security - Matthew Rosenquist 2013Intel IT Experts Tour   Cyber Security - Matthew Rosenquist 2013
Intel IT Experts Tour Cyber Security - Matthew Rosenquist 2013
Ā 
1. ch 1-introduction
1. ch 1-introduction1. ch 1-introduction
1. ch 1-introduction
Ā 
Engineering Software Products: 1. software products
Engineering Software Products: 1. software productsEngineering Software Products: 1. software products
Engineering Software Products: 1. software products
Ā 
Veritas Resiliency Platform
Veritas Resiliency PlatformVeritas Resiliency Platform
Veritas Resiliency Platform
Ā 
Usability Challenges in Cutting-edge Medical Devices and Exoskeleton Robotics
Usability Challenges in Cutting-edge Medical Devices and Exoskeleton RoboticsUsability Challenges in Cutting-edge Medical Devices and Exoskeleton Robotics
Usability Challenges in Cutting-edge Medical Devices and Exoskeleton Robotics
Ā 
Application security meetup k8_s security with zero trust_29072021
Application security meetup k8_s security with zero trust_29072021Application security meetup k8_s security with zero trust_29072021
Application security meetup k8_s security with zero trust_29072021
Ā 
Migrate from BigFix to Ivanti
Migrate from BigFix to IvantiMigrate from BigFix to Ivanti
Migrate from BigFix to Ivanti
Ā 
Ch1 introduction
Ch1 introductionCh1 introduction
Ch1 introduction
Ā 
Techniques for Developing Systems in IT Management System
Techniques for Developing Systems in IT Management SystemTechniques for Developing Systems in IT Management System
Techniques for Developing Systems in IT Management System
Ā 
Fundamentals of Computing Chapter 7
Fundamentals of Computing Chapter 7Fundamentals of Computing Chapter 7
Fundamentals of Computing Chapter 7
Ā 
Five reasons to model during QA
Five reasons to model during QAFive reasons to model during QA
Five reasons to model during QA
Ā 
Secure Delivery Center, Eclipse Open Source
Secure Delivery Center, Eclipse Open SourceSecure Delivery Center, Eclipse Open Source
Secure Delivery Center, Eclipse Open Source
Ā 

Similar to Intro to android (gdays)

Android app development by abhi android
Android app development by abhi androidAndroid app development by abhi android
Android app development by abhi androidsusijanny
Ā 
Android app development
Android app developmentAndroid app development
Android app developmentAbhishek Saini
Ā 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions newJoe Jacob
Ā 
Android Seminar BY Suleman Khan.pdf
Android Seminar BY Suleman Khan.pdfAndroid Seminar BY Suleman Khan.pdf
Android Seminar BY Suleman Khan.pdfNomanKhan869872
Ā 
Developing for Android-Types of Android Application
Developing for Android-Types of Android ApplicationDeveloping for Android-Types of Android Application
Developing for Android-Types of Android ApplicationNandini Prabhu
Ā 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programmingPERKYTORIALS
Ā 
Android Application Development Training by NITIN GUPTA
Android Application Development Training by NITIN GUPTA Android Application Development Training by NITIN GUPTA
Android Application Development Training by NITIN GUPTA NITIN GUPTA
Ā 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app developmentAbhishekKumar4779
Ā 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_authlzongren
Ā 
Android technology
Android technology Android technology
Android technology vikas malviya
Ā 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Javaamaankhan
Ā 
Mobile Application Development powerpoint
Mobile Application Development powerpointMobile Application Development powerpoint
Mobile Application Development powerpointJohnLagman3
Ā 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionDuckMa
Ā 
Android Seminar || history || versions||application developement
Android Seminar || history || versions||application developement Android Seminar || history || versions||application developement
Android Seminar || history || versions||application developement Shubham Pahune
Ā 
Android Workshop Part 1
Android Workshop Part 1Android Workshop Part 1
Android Workshop Part 1NAILBITER
Ā 

Similar to Intro to android (gdays) (20)

Android - Anroid Pproject
Android - Anroid PprojectAndroid - Anroid Pproject
Android - Anroid Pproject
Ā 
Android app development by abhi android
Android app development by abhi androidAndroid app development by abhi android
Android app development by abhi android
Ā 
Android app development
Android app developmentAndroid app development
Android app development
Ā 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
Ā 
Android Seminar BY Suleman Khan.pdf
Android Seminar BY Suleman Khan.pdfAndroid Seminar BY Suleman Khan.pdf
Android Seminar BY Suleman Khan.pdf
Ā 
Android ppt
Android ppt Android ppt
Android ppt
Ā 
Android Applications
Android ApplicationsAndroid Applications
Android Applications
Ā 
Android ppt
Android pptAndroid ppt
Android ppt
Ā 
Android
AndroidAndroid
Android
Ā 
Developing for Android-Types of Android Application
Developing for Android-Types of Android ApplicationDeveloping for Android-Types of Android Application
Developing for Android-Types of Android Application
Ā 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programming
Ā 
Android Application Development Training by NITIN GUPTA
Android Application Development Training by NITIN GUPTA Android Application Development Training by NITIN GUPTA
Android Application Development Training by NITIN GUPTA
Ā 
Seminar on android app development
Seminar on android app developmentSeminar on android app development
Seminar on android app development
Ā 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
Ā 
Android technology
Android technology Android technology
Android technology
Ā 
Android Application Development Using Java
Android Application Development Using JavaAndroid Application Development Using Java
Android Application Development Using Java
Ā 
Mobile Application Development powerpoint
Mobile Application Development powerpointMobile Application Development powerpoint
Mobile Application Development powerpoint
Ā 
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break editionMatteo Gazzurelli - Introduction to Android Development - Have a break edition
Matteo Gazzurelli - Introduction to Android Development - Have a break edition
Ā 
Android Seminar || history || versions||application developement
Android Seminar || history || versions||application developement Android Seminar || history || versions||application developement
Android Seminar || history || versions||application developement
Ā 
Android Workshop Part 1
Android Workshop Part 1Android Workshop Part 1
Android Workshop Part 1
Ā 

Recently uploaded

What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
Ā 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
Ā 
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
Ā 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
Ā 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
Ā 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
Ā 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
Ā 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
Ā 
(Genuine) Escort Service Lucknow | Starting ā‚¹,5K To @25k with A/C šŸ§‘šŸ½ā€ā¤ļøā€šŸ§‘šŸ» 89...
(Genuine) Escort Service Lucknow | Starting ā‚¹,5K To @25k with A/C šŸ§‘šŸ½ā€ā¤ļøā€šŸ§‘šŸ» 89...(Genuine) Escort Service Lucknow | Starting ā‚¹,5K To @25k with A/C šŸ§‘šŸ½ā€ā¤ļøā€šŸ§‘šŸ» 89...
(Genuine) Escort Service Lucknow | Starting ā‚¹,5K To @25k with A/C šŸ§‘šŸ½ā€ā¤ļøā€šŸ§‘šŸ» 89...gurkirankumar98700
Ā 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
Ā 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
Ā 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
Ā 
Russian Call Girls in Karol Bagh Aasnvi āž”ļø 8264348440 šŸ’‹šŸ“ž Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi āž”ļø 8264348440 šŸ’‹šŸ“ž Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi āž”ļø 8264348440 šŸ’‹šŸ“ž Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi āž”ļø 8264348440 šŸ’‹šŸ“ž Independent Escort S...soniya singh
Ā 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
Ā 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
Ā 
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
Ā 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
Ā 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
Ā 
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
Ā 

Recently uploaded (20)

What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
Ā 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
Ā 
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
Ā 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
Ā 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
Ā 
Call Girls In Mukherjee Nagar šŸ“± 9999965857 šŸ¤© Delhi šŸ«¦ HOT AND SEXY VVIP šŸŽ SE...
Call Girls In Mukherjee Nagar šŸ“±  9999965857  šŸ¤© Delhi šŸ«¦ HOT AND SEXY VVIP šŸŽ SE...Call Girls In Mukherjee Nagar šŸ“±  9999965857  šŸ¤© Delhi šŸ«¦ HOT AND SEXY VVIP šŸŽ SE...
Call Girls In Mukherjee Nagar šŸ“± 9999965857 šŸ¤© Delhi šŸ«¦ HOT AND SEXY VVIP šŸŽ SE...
Ā 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
Ā 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
Ā 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
Ā 
(Genuine) Escort Service Lucknow | Starting ā‚¹,5K To @25k with A/C šŸ§‘šŸ½ā€ā¤ļøā€šŸ§‘šŸ» 89...
(Genuine) Escort Service Lucknow | Starting ā‚¹,5K To @25k with A/C šŸ§‘šŸ½ā€ā¤ļøā€šŸ§‘šŸ» 89...(Genuine) Escort Service Lucknow | Starting ā‚¹,5K To @25k with A/C šŸ§‘šŸ½ā€ā¤ļøā€šŸ§‘šŸ» 89...
(Genuine) Escort Service Lucknow | Starting ā‚¹,5K To @25k with A/C šŸ§‘šŸ½ā€ā¤ļøā€šŸ§‘šŸ» 89...
Ā 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
Ā 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
Ā 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
Ā 
Russian Call Girls in Karol Bagh Aasnvi āž”ļø 8264348440 šŸ’‹šŸ“ž Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi āž”ļø 8264348440 šŸ’‹šŸ“ž Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi āž”ļø 8264348440 šŸ’‹šŸ“ž Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi āž”ļø 8264348440 šŸ’‹šŸ“ž Independent Escort S...
Ā 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
Ā 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Ā 
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
Ā 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Ā 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
Ā 
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...
Ā 

Intro to android (gdays)

  • 1. INTRODUCTION TO ANDROID DEVELOPMENT Adejuwon Omolara Twitter: @_larikraun Email: larryade92@gmail.com
  • 2. Overview ā€¢ Android is a software stack for mobile devices that includes an operating system, middleware and key applications. ā€¢ Android OS is divided into five sections ā€¢ Applications: This is where applications to be installed are written. E.g. Games, Browser etc. ā€¢ Application Framework: This layer provides many higher-level services to applications in the form of Java classes. ā€¢ Android Runtime: This section provides a key component called Dalvik Virtual Machine. Dalvik VM enables every android application to run in its own process, with its own instance of the Dalvik VM. Dalvik VM is optimised to run on slow CPU, low RAM, low power devices. It runs .dex files and not .class nor .jar ā€¢ Libraries: e.g. SQLite database, repository for storage and sharing of application. ā€¢ Linux Kernel : it provides basic system functionality e.g. process management, device management etc.
  • 4. Android has evolved over the years : ā€¢ Android 1.1 *Not relevant in the ecosystem* ā€¢ Android 1.5 Cupcake *Not relevant in the ecosystem* ā€¢ Android 1.6 Donut *Not relevant in the ecosystem* ā€¢ Android 2.0/2.1 Eclair *Not relevant in the ecosystem* ā€¢ Android 2.2.x Froyo *Not too relevant in the ecosystem* ā€¢ Android 2.3.x Gingerbread *Still somewhat relevant in the ecosystem* ā€¢ Android 3. x Honeycomb *Not relevant in the ecosystem* ā€¢ Android 4.0.x Ice Cream Sandwich *Still quite relevant in the ecosystem* ā€¢ Android 4.1, 4.2, 4.3 Jelly Bean *Very relevant in the ecosystem* ā€¢ Android 4.4 KitKat *Very relevant in the ecosystem* ā€¢ Android 5.0 Lollipop * Gaining relevance in the ecosystem*
  • 5. And now we have Lollipopā€¦
  • 6. Tools you need to get startedā€¦ ā€¢ A fair knowledge of Java ā€¢ Latest Java Development Kit (JDK) : Android Apps are developed using Java. http://www.oracle.com/technetwork/java/javase/downloads/inde x.html ā€¢ Eclipse Integrated Development Environment (IDE) https://www.eclipse.org/downloads/ or any other suitable IDE. ā€¢ Android SDK http://developer.android.com ā€¢ ADT Tools for Eclipse (via Internet) http://developer.android.com/sdk/index.html ā€¢ Android Virtual Device (AVD) or an android mobile device.
  • 7. Application Components Applications use four main components: ā€¢ Activity ā€¢ Service ā€¢ Broadcast Receivers ā€¢ Content Providers
  • 8. Activity Activities: A single screen that is visible to user. They dictate the UI and handle the user interaction to the smartphone screen. public class MainActivity extends Activity { }
  • 10. Services Services: They handle background processes associated with an application. They can be used to update an application when itā€™s not active. public class MyService extends Service { }
  • 12. Broadcast Receiver Broadcast Receivers: They handle communication between Android OS and applications. They listen for android system events. public class MyReceiver extends BroadcastReceiver { }
  • 13. Content Providers Content Providers: They handle and manage data, usually stored in database and data access for queries. public class MyContentProvider extends ContentProvider { }
  • 14. More Componentsā€¦ ā€¢ Fragments: Represents a behaviour or a portion of user interface. ā€¢ Views: UI elements that are drawn onscreen. They are responsible for event handling e.g. ContextMenu, Menu etc. ā€¢ Widgets: They are more advanced UI elements e.g Button, CheckBox, ImageView etc. ā€¢ Layouts: View hierarchies that control screen format and appearance of the views.
  • 15. ā€¢ Intents: Messages wiring components together. An intent is composed of an action it needs to perform. They are used to start activities and to communicate among various parts of the android system. ā€¢ Resources: External elements such as strings, drawables and constants ā€¢ Manifest: Configuration file for the application.
  • 16. Layout Manager It is responsible for the layout of itself and its child Views. Android supports different default layout managers. To get a desired layout, there are some few terms you would come across. ļƒ¼android:layout_width defines the width of the widget. ļƒ¼android:layout_heigth defines the height of the widget. ļƒ¼match_parent tells the application to maximize the widget in its parent. ļƒ¼wrap_content tells the layout to allocate the minimum amount so that the widget is rendered correctly.
  • 18. Who doesnā€™t like easy tasks? Well, I doā€¦ Google exposes a number of functionalities in android. To create spectacular apps, you should make use of them. ā€¢ Touchscreen ā€¢ GPS ā€¢ Accelerometer ā€¢ Internet ā€¢ Audio and Video support ā€¢ Contacts ā€¢ Security ā€¢ Google APIs
  • 19. API levels This is an integer value that uniquely identifies the framework API revision offered by a version of the android platform. ļƒ¼It lets the android platform describe the maximum framework API revision that it supports. ļƒ¼It lets applications describe the framework API revision that they require. ļƒ¼It lets the system negotiate the installation of applications on the userā€™s device such that version-incompatible are not installed. You can catch more gist on API levels here
  • 20.
  • 22. My One-Dollar To write a working android application, you need to consider keeping it simple. Nobody likes a complex-for- nothing application. I encourage drawing mock-ups ( a visual representation of how you want the application to look like), flow charts ( a step-by-step approach to achieving your goal) as one of the first steps before jumping on your IDE. You will need to step up your UI/UX game to ā€˜wowā€™ your users.
  • 23. I think these will help too ā€¢ Make Google your friend ā€¢ Get familiar with android developersā€™ site ā€¢ Read documentations before using any API ā€¢ Join forums that will help. One of the most popular is stackoverflow ā€¢ Get close to the ā€˜gurusā€™- they have a lot to offer. ā€¢ Read books that will help.
  • 24. My ā€˜Hello Worldā€™Application This is a dummy application that just displays ā€˜Hello World, MyFirstAppā€™ ļƒ¼ MyFirstApp.java + main.xml =
  • 28. ļƒ¼ package attribute defines the base package for the Java objects referred to in a particular file. ļƒ¼ android:versionCode must be an integer. You typically start from ā€˜1ā€™ and increase the value by one if you roll-out a new version of your application. ļƒ¼ android:versionName is what the users see. It can be any string. ļƒ¼ android:minSdkVersion defines the minimum version of android your applicaton works on. A user cannot install your application on a device with a lower API level than specified in this attribute. ļƒ¼ android:targetSdkVersion specifies the version on which you tested and developed. It is a good practice to always set this to the latest Android API version.
  • 29. ļƒ¼ <application> section is a container for declaring android components. ļƒ¼ <activity> tag defines an activity component. ļƒ¼ android:name="android.intent.action.MAIN" can be started and the category ļƒ¼ android:name="android.intent.category.LAUNCHERā€œ parameter tells the Android system to add the activity to the launcher.