SlideShare une entreprise Scribd logo
1  sur  60
INTRODUCTION TO
ANDROID AND ANDROID
STUDIO
Suyash Srijan
ABOUT THE SPEAKER
• Computer science student at Oxford Brookes
• A kickass Android developer with nearly 6 years of experience
• Experience with building ROMs and porting Android to different devices
• Experience with other platforms (iOS, Windows, Blackberry) and Wearables (Pebble & Android Wear)
• Overall a very cool guy
@suyashsrijan
fb.com/suyashsrijan
github.com/theblixguy
WHAT WILL WE LEARN TODAY
• What is Android
• Why develop for Android
• Android platform overview
• Android app overview
• Android app lifecycle
• Android app fundamentals (activities, intents, etc)
• Design
• Device compatibility
• Distribution
• What we need to get started with Android development
• Android Studio and development tools
WHAT IS
Android is the world’s most popular and dominant mobile operating
system. It is based on Linux kernel 3.4/3.10 (depending on device) and is
open-source (with proprietary bits). It runs on a wide variety of hardware,
including smartphones, smart watches, cars, televisions, digital cameras,
game consoles and more. It was founded by Andy Rubin and three
others in October 2003 and got acquired by Google in August 2005.
WHY DEVELOP FOR
is gigantic
• Over 1B users
• Over 1.5M activations per day
• Over 200M smartphones running Android sold annually
• Over 1.43M apps available
• Over 76% smartphone operating system market share
is freedom
• Thousands of third party libraries available
• Free SDK, IDE and emulator
• No restrictions; access anything*
• Faster access to new form factors and hardware
• Distribute your app anywhere (Playstore, Amazon Appstore, …)
* well, not anything, but you get the point
PLATFORM OVERVIEW
APP OVERVIEW
• Java: Java class files containing app logic
• Res: Different resource files
• Anim: Animation resource files
• Drawable: Images
• Drawable-Xdpi: Images depending on screen density
• Layout: App layout files
• Menu: Layout menu files
• Values: Value files (strings, colors, arrays, etc)
• Values-vX: Value files depending on API level
• Values-Xdp: Value files depending on screen density
• XML: XML files (duh)
• AndroidManifest.xml: App metadata file
• build.gradle: Build related settings
APP LIFECYCLE
APP FUNDAMENTALS
ACTIVITY
• A window/interface which a user can interact with
• Every app has at least one activity
• Activities can be full-screen, floating or embedded
inside another activity
startActivity(new Intent(this, newActivity.class));
FRAGMENTS
• A piece of user interface that is meant to be reused
• Adds modularity to your app and makes dynamic UI
design easy
• It has its own layout, behavior and lifecycle callbacks,
but it killed/stop if the activity is too
getFragmentManager().beginTransaction().add(andr
oid.R.id.content, new MyFragment()).commit();
INTENTS
• An intent is an abstract description of an operation to
be performed. Think of it as an “intention” to do
something
• Intents can be used to start activities, services or send
a broadcast
• Intents are of two types – Explicit (when you know
what exactly you want to do), and Implicit (when
you’re not sure what you want to do)
Intent viewAmazon = new
Intent(android.content.Intent.ACTION_VIEW,
Uri.parse(“http://www.amazon.com”));
startActivity(viewAmazon);
SERVICES
• A service is a long running
operation in the background
• There are two types of services
in Android – Bounded (which
runs as long as components
which bind to it run) and
Unbounded (which runs
indefinitely) but a service can
also be both
• Services run on the main thread
of the application by default
startService(new Intent(this,
myService.class));
BROADCAST RECIEVERS
App/Service
System sends a
broadcast
Battery level
changes
SMS received
Photo captured
• A broadcast is a system or
app event that can be
“broadcasted” so other
apps/services can listen for it
• Broadcasts are handled by
a BroadcastReceiver, which
is a component that allows
you to listen for broadcasts
• A BroadcastReceiver can be
implemented in
AndroidManifest.xml, or
dynamically by calling
registerReceiver(), or both
• An app’s/services’s
BroadcastReceiver is never
called if the app/service
hasn’t been explicitly started
by the user
CONTENT PROVIDERS/RESOLVERS
App
Database
Insert
Update Delete
Fetch
• A content provider allows you
to store data in your app in a
structured way, similar to a
relational database like SQL, for
the purpose of providing it to
other apps. Example usage:
Contacts app, SMS app, etc
• A content resolver allows you
to get data from a content
provider or manipulate its data
(modify, delete, update, etc)
• You cannot request to read
data from a content provider
at runtime, it has to be
declared in
AndroidManifest.xml
ANDROIDMANIFEST.XML
LAYOUTS
• A layout defines the visual structure for a user
interface, such as the UI for an activity or app widget
• Layouts can be defined both in XML or
programmatically using View and ViewGroup objects
• There are 5 different types of Layouts in Android:
LinearLayout, RelativeLayout, FrameLayout,
TableLayout and AbsoluteLayout
DESIGN
DEVICE COMPATIBILITY
Android is designed to run on many different types of devices, from phones to tablets
and televisions. As a developer, the range of devices provides a huge potential
audience for your app. In order for your app to be successful on all these devices, it
should tolerate some feature variability and provide a flexible user interface that
adapts to different screen configurations. To facilitate your effort toward that goal,
Android provides a dynamic app framework in which you can provide configuration-
specific app resources in static files (such as different XML layouts for different screen
sizes). Android then loads the appropriate resources based on the current device
configuration. So with some forethought to your app design and some additional app
resources, you can publish a single application package (APK) that provides an
optimized user experience on a variety of devices. If necessary, however, you can
specify your app's feature requirements and control which types of devices can install
your app from Google Play Store.
DISTRIBUTION
WHAT DO I NEED TO BUILD AN
APP?
JAVA PROGRAMMING
LANGUAGE & XML
docs.oracle.com/javase/tutorial/java/
ANDROID SDK & SDK TOOLS
developer.android.com/sdk
ANDROID STUDIO
tools.android.com/download/studio
AND OF COURSE…
MORE ON ANDROID STUDIO
ADB
• Connect to an Android device or emulator
• Read logcat
• Install, reinstall or uninstall apps
• Send/retrieve files to/from device storage
• Forward ports
• Record screen or take screenshots
• Reboot your phone into boot loader or recovery
mode
• Take backups or restore them
• Execute shell commands
DEVICE MONITOR
LOGCAT
SDK MANAGER
WORKFLOW
THERE’S STILL A LOT TO COVER…
NDK, Support Library, Google services APIs, Monetization, etc.
THANK YOU
PLEASE FOLLOW US ON SOCIAL MEDIA CHANNELS
FOR INFORMATION ON UPCOMING EVENTS, TALKS
AND MORE
@gdgoxford
fb.com/gdgoxford
plus.google.com/+GdgoxfordUkGoogleDevelopers/

Contenu connexe

Tendances

Creating the first app with android studio
Creating the first app with android studioCreating the first app with android studio
Creating the first app with android studioParinita03
 
Introduction to Android ppt
Introduction to Android pptIntroduction to Android ppt
Introduction to Android pptTaha Malampatti
 
Presentation on Android application
Presentation on Android applicationPresentation on Android application
Presentation on Android applicationAtibur Rahman
 
Mobile application development ppt
Mobile application development pptMobile application development ppt
Mobile application development ppttirupathinews
 
Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)Ahsanul Karim
 
Basic android-ppt
Basic android-pptBasic android-ppt
Basic android-pptSrijib Roy
 
Android Web app
Android Web app Android Web app
Android Web app Sumit Kumar
 
Introduction To Mobile Application Development
Introduction To Mobile Application DevelopmentIntroduction To Mobile Application Development
Introduction To Mobile Application DevelopmentSyed Absar
 
android architecture
android architectureandroid architecture
android architectureAashita Gupta
 
Introduction to Mobile Application Development
Introduction to Mobile Application DevelopmentIntroduction to Mobile Application Development
Introduction to Mobile Application DevelopmentTharindu Dassanayake
 
Android Project Presentation
Android Project PresentationAndroid Project Presentation
Android Project PresentationLaxmi Kant Yadav
 
android-tutorial-for-beginner
android-tutorial-for-beginnerandroid-tutorial-for-beginner
android-tutorial-for-beginnerAjailal Parackal
 
Eclipse introduction IDE PRESENTATION
Eclipse introduction IDE PRESENTATIONEclipse introduction IDE PRESENTATION
Eclipse introduction IDE PRESENTATIONAYESHA JAVED
 
Android Development with Kotlin, Part 1 - Introduction
Android Development with Kotlin, Part 1 - IntroductionAndroid Development with Kotlin, Part 1 - Introduction
Android Development with Kotlin, Part 1 - IntroductionAndreas Jakl
 
Android SDK Tutorial | Edureka
Android SDK Tutorial | EdurekaAndroid SDK Tutorial | Edureka
Android SDK Tutorial | EdurekaEdureka!
 

Tendances (20)

Creating the first app with android studio
Creating the first app with android studioCreating the first app with android studio
Creating the first app with android studio
 
Introduction to Android ppt
Introduction to Android pptIntroduction to Android ppt
Introduction to Android ppt
 
Presentation on Android application
Presentation on Android applicationPresentation on Android application
Presentation on Android application
 
Mobile application development ppt
Mobile application development pptMobile application development ppt
Mobile application development ppt
 
Introduction to React Native
Introduction to React NativeIntroduction to React Native
Introduction to React Native
 
Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)Day: 1 Introduction to Mobile Application Development (in Android)
Day: 1 Introduction to Mobile Application Development (in Android)
 
Basic android-ppt
Basic android-pptBasic android-ppt
Basic android-ppt
 
Android Web app
Android Web app Android Web app
Android Web app
 
Introduction To Mobile Application Development
Introduction To Mobile Application DevelopmentIntroduction To Mobile Application Development
Introduction To Mobile Application Development
 
android architecture
android architectureandroid architecture
android architecture
 
Introduction to Mobile Application Development
Introduction to Mobile Application DevelopmentIntroduction to Mobile Application Development
Introduction to Mobile Application Development
 
Android Project Presentation
Android Project PresentationAndroid Project Presentation
Android Project Presentation
 
android-tutorial-for-beginner
android-tutorial-for-beginnerandroid-tutorial-for-beginner
android-tutorial-for-beginner
 
Eclipse introduction IDE PRESENTATION
Eclipse introduction IDE PRESENTATIONEclipse introduction IDE PRESENTATION
Eclipse introduction IDE PRESENTATION
 
Android ppt
Android ppt Android ppt
Android ppt
 
Android Development with Kotlin, Part 1 - Introduction
Android Development with Kotlin, Part 1 - IntroductionAndroid Development with Kotlin, Part 1 - Introduction
Android Development with Kotlin, Part 1 - Introduction
 
React native
React nativeReact native
React native
 
Android SDK Tutorial | Edureka
Android SDK Tutorial | EdurekaAndroid SDK Tutorial | Edureka
Android SDK Tutorial | Edureka
 
Flutter
FlutterFlutter
Flutter
 
Android User Interface
Android User InterfaceAndroid User Interface
Android User Interface
 

Similaire à Introduction to Android and Android Studio

Android Workshop_1
Android Workshop_1Android Workshop_1
Android Workshop_1Purvik Rana
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programmingPERKYTORIALS
 
Intro To Android App Development
Intro To Android App DevelopmentIntro To Android App Development
Intro To Android App DevelopmentMike Kvintus
 
Android development orientation for starters v2
Android development orientation for starters v2Android development orientation for starters v2
Android development orientation for starters v2Joemarie Amparo
 
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
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersBoom Shukla
 
Android Penetration Testing - Day 1
Android Penetration Testing - Day 1Android Penetration Testing - Day 1
Android Penetration Testing - Day 1Mohammed Adam
 
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
 
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
 
architecture of android.pptx
architecture of android.pptxarchitecture of android.pptx
architecture of android.pptxallurestore
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_authlzongren
 
Android architecture
Android architectureAndroid architecture
Android architectureDeepa Rahul
 
Android Development
Android DevelopmentAndroid Development
Android Developmentmclougm4
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions newJoe Jacob
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A NutshellTed Chien
 
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
 

Similaire à Introduction to Android and Android Studio (20)

Android Workshop_1
Android Workshop_1Android Workshop_1
Android Workshop_1
 
Getting started with android programming
Getting started with android programmingGetting started with android programming
Getting started with android programming
 
Intro To Android App Development
Intro To Android App DevelopmentIntro To Android App Development
Intro To Android App Development
 
Intro to android (gdays)
Intro to android (gdays)Intro to android (gdays)
Intro to android (gdays)
 
Android development orientation for starters v2
Android development orientation for starters v2Android development orientation for starters v2
Android development orientation for starters v2
 
Part 2 android application development 101
Part 2 android application development 101Part 2 android application development 101
Part 2 android application development 101
 
Android fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginnersAndroid fundamentals and tutorial for beginners
Android fundamentals and tutorial for beginners
 
Android Penetration Testing - Day 1
Android Penetration Testing - Day 1Android Penetration Testing - Day 1
Android Penetration Testing - Day 1
 
Introduction to Android Development Part 1
Introduction to Android Development Part 1Introduction to Android Development Part 1
Introduction to Android Development Part 1
 
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
 
architecture of android.pptx
architecture of android.pptxarchitecture of android.pptx
architecture of android.pptx
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Android architecture
Android architectureAndroid architecture
Android architecture
 
Android Development
Android DevelopmentAndroid Development
Android Development
 
Introduction to android sessions new
Introduction to android   sessions newIntroduction to android   sessions new
Introduction to android sessions new
 
Androidify workshop
Androidify workshopAndroidify workshop
Androidify workshop
 
PPT Companion to Android
PPT Companion to AndroidPPT Companion to Android
PPT Companion to Android
 
Android In A Nutshell
Android In A NutshellAndroid In A Nutshell
Android In A Nutshell
 
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 dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 

Dernier

Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile EnvironmentVictorSzoltysek
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastPapp Krisztián
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionOnePlan Solutions
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
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
 

Dernier (20)

Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
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
 

Introduction to Android and Android Studio

  • 1. INTRODUCTION TO ANDROID AND ANDROID STUDIO Suyash Srijan
  • 2. ABOUT THE SPEAKER • Computer science student at Oxford Brookes • A kickass Android developer with nearly 6 years of experience • Experience with building ROMs and porting Android to different devices • Experience with other platforms (iOS, Windows, Blackberry) and Wearables (Pebble & Android Wear) • Overall a very cool guy @suyashsrijan fb.com/suyashsrijan github.com/theblixguy
  • 3. WHAT WILL WE LEARN TODAY • What is Android • Why develop for Android • Android platform overview • Android app overview • Android app lifecycle • Android app fundamentals (activities, intents, etc) • Design • Device compatibility • Distribution • What we need to get started with Android development • Android Studio and development tools
  • 5. Android is the world’s most popular and dominant mobile operating system. It is based on Linux kernel 3.4/3.10 (depending on device) and is open-source (with proprietary bits). It runs on a wide variety of hardware, including smartphones, smart watches, cars, televisions, digital cameras, game consoles and more. It was founded by Andy Rubin and three others in October 2003 and got acquired by Google in August 2005.
  • 7. is gigantic • Over 1B users • Over 1.5M activations per day • Over 200M smartphones running Android sold annually • Over 1.43M apps available • Over 76% smartphone operating system market share
  • 8. is freedom • Thousands of third party libraries available • Free SDK, IDE and emulator • No restrictions; access anything* • Faster access to new form factors and hardware • Distribute your app anywhere (Playstore, Amazon Appstore, …) * well, not anything, but you get the point
  • 10.
  • 12. • Java: Java class files containing app logic • Res: Different resource files • Anim: Animation resource files • Drawable: Images • Drawable-Xdpi: Images depending on screen density • Layout: App layout files • Menu: Layout menu files • Values: Value files (strings, colors, arrays, etc) • Values-vX: Value files depending on API level • Values-Xdp: Value files depending on screen density • XML: XML files (duh) • AndroidManifest.xml: App metadata file • build.gradle: Build related settings
  • 13.
  • 15.
  • 18. • A window/interface which a user can interact with • Every app has at least one activity • Activities can be full-screen, floating or embedded inside another activity startActivity(new Intent(this, newActivity.class));
  • 20. • A piece of user interface that is meant to be reused • Adds modularity to your app and makes dynamic UI design easy • It has its own layout, behavior and lifecycle callbacks, but it killed/stop if the activity is too getFragmentManager().beginTransaction().add(andr oid.R.id.content, new MyFragment()).commit();
  • 22. • An intent is an abstract description of an operation to be performed. Think of it as an “intention” to do something • Intents can be used to start activities, services or send a broadcast • Intents are of two types – Explicit (when you know what exactly you want to do), and Implicit (when you’re not sure what you want to do) Intent viewAmazon = new Intent(android.content.Intent.ACTION_VIEW, Uri.parse(“http://www.amazon.com”)); startActivity(viewAmazon);
  • 24. • A service is a long running operation in the background • There are two types of services in Android – Bounded (which runs as long as components which bind to it run) and Unbounded (which runs indefinitely) but a service can also be both • Services run on the main thread of the application by default startService(new Intent(this, myService.class));
  • 26. App/Service System sends a broadcast Battery level changes SMS received Photo captured • A broadcast is a system or app event that can be “broadcasted” so other apps/services can listen for it • Broadcasts are handled by a BroadcastReceiver, which is a component that allows you to listen for broadcasts • A BroadcastReceiver can be implemented in AndroidManifest.xml, or dynamically by calling registerReceiver(), or both • An app’s/services’s BroadcastReceiver is never called if the app/service hasn’t been explicitly started by the user
  • 28. App Database Insert Update Delete Fetch • A content provider allows you to store data in your app in a structured way, similar to a relational database like SQL, for the purpose of providing it to other apps. Example usage: Contacts app, SMS app, etc • A content resolver allows you to get data from a content provider or manipulate its data (modify, delete, update, etc) • You cannot request to read data from a content provider at runtime, it has to be declared in AndroidManifest.xml
  • 30.
  • 32. • A layout defines the visual structure for a user interface, such as the UI for an activity or app widget • Layouts can be defined both in XML or programmatically using View and ViewGroup objects • There are 5 different types of Layouts in Android: LinearLayout, RelativeLayout, FrameLayout, TableLayout and AbsoluteLayout
  • 34.
  • 36. Android is designed to run on many different types of devices, from phones to tablets and televisions. As a developer, the range of devices provides a huge potential audience for your app. In order for your app to be successful on all these devices, it should tolerate some feature variability and provide a flexible user interface that adapts to different screen configurations. To facilitate your effort toward that goal, Android provides a dynamic app framework in which you can provide configuration- specific app resources in static files (such as different XML layouts for different screen sizes). Android then loads the appropriate resources based on the current device configuration. So with some forethought to your app design and some additional app resources, you can publish a single application package (APK) that provides an optimized user experience on a variety of devices. If necessary, however, you can specify your app's feature requirements and control which types of devices can install your app from Google Play Store.
  • 37.
  • 39.
  • 40. WHAT DO I NEED TO BUILD AN APP?
  • 41. JAVA PROGRAMMING LANGUAGE & XML docs.oracle.com/javase/tutorial/java/
  • 42. ANDROID SDK & SDK TOOLS developer.android.com/sdk
  • 45.
  • 46. MORE ON ANDROID STUDIO
  • 47.
  • 48. ADB
  • 49. • Connect to an Android device or emulator • Read logcat • Install, reinstall or uninstall apps • Send/retrieve files to/from device storage • Forward ports • Record screen or take screenshots • Reboot your phone into boot loader or recovery mode • Take backups or restore them • Execute shell commands
  • 51.
  • 53.
  • 55.
  • 57.
  • 58. THERE’S STILL A LOT TO COVER… NDK, Support Library, Google services APIs, Monetization, etc.
  • 60. PLEASE FOLLOW US ON SOCIAL MEDIA CHANNELS FOR INFORMATION ON UPCOMING EVENTS, TALKS AND MORE @gdgoxford fb.com/gdgoxford plus.google.com/+GdgoxfordUkGoogleDevelopers/