SlideShare una empresa de Scribd logo
1 de 26
Android	
  For	
  Java	
  
  Developers	
  

     Marko	
  Gargenta	
  
       Marakana	
  
Agenda	
  
•    Android	
  History	
  
•    Android	
  and	
  Java	
  
•    Android	
  SDK	
  
•    Hello	
  World!	
  
•    Main	
  Building	
  Blocks	
  
•    Debugging	
  
•    Summary	
  
History	
  
2005	
     Google	
  buys	
  Android,	
  Inc.	
  
           Work	
  on	
  Dalvik	
  starts	
  


2007	
     OHA	
  Announced	
  
           Early	
  SDK	
  


2008	
     G1	
  Announced	
  
           SDK	
  1.0	
  Released	
  


2009	
     G2	
  Released	
  
           Cupcake,	
  Donut,	
  Eclair	
  
Android	
  and	
  Java	
  

Android Java =
Java SE –
AWT/Swing +
Android API
Android	
  SDK	
  -­‐	
  What’s	
  in	
  the	
  box
                                                     	
  
SDK

Tools
Docs
Platforms
     Data
     Skins
     Images
     Samples
Add-ons
     Google Maps
The	
  Tools
           	
  
          Tools are important part of the
          SDK. They are available via
          Eclipse plugin as well as command
          line shell.
HELLO	
  WORLD!	
  
Create	
  New	
  Project
                                         	
  
Use the Eclipse tool to create a new
Android project.

Here are some key constructs:


Project	
          Eclipse	
  construct	
  
Target	
           minimum	
  to	
  run	
  
App	
  name	
      whatever	
  
Package	
          Java	
  package	
  
AcXvity	
          Java	
  class	
  
The	
  Manifest	
  File	
  
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
   package="com.marakana"
   android:versionCode="1"
   android:versionName="1.0">
  <application android:icon="@drawable/icon"
        android:label="@string/app_name">
    <activity android:name=".HelloAndroid"
           android:label="@string/app_name">
       <intent-filter>
          <action android:name="android.intent.action.MAIN" />
          <category android:name="android.intent.category.LAUNCHER" />
       </intent-filter>
    </activity>
  </application>
  <uses-sdk android:minSdkVersion="5" />
</manifest>
The	
  Layout	
  Resource	
  

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:orientation="vertical"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  >
<TextView
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  android:text="@string/hello"
  />
</LinearLayout>
The	
  Java	
  File	
  
package com.marakana;

import android.app.Activity;
import android.os.Bundle;

public class HelloAndroid extends Activity {
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.main);
  }
}
Running	
  on	
  Emulator
                        	
  
MAIN	
  BUILDING	
  BLOCKS	
  
AcXviXes
                       	
  
Activity is to an    Android Application

application what a       Main Activity
                                           Another    Another
                                           Activity   Activity
web page is to a
website. Sort of.
AcXvity	
  Lifecycle	
  
                                                         Starting




Activities have a well-
                                                     (1) onCreate()
                                                      (2) onStart()
                                              (3) onRestoreInstanceState()

defined lifecycle. The                              (4) onResume()


Android OS manages
your activity by                                         Running


changing its state.       (3) onResume()
                            (2) onStart()
                                                                               (1) onSaveInstanceState()
                                                                                     (2) onPause()

You fill in the blanks.
                           (1) onRestart()                    onResume()


                                                  (1) onSaveInstanceState()
                            Stopped                      (2) onStop()                     Paused



                                 onDestroy()
                                     or                                       <process killed>
                               <process killed>

                                                        Destroyed
Intents
                           	
  
Intents are to      Android Application
Android apps                                         Another
                        Main Activity     Intent
what hyperlinks                                      Activity

are to websites.
They can be




                                                        Intent
implicit and
                    Android Application
explicit. Sort of
like absolute and       Main Activity       Intent
                                                     Another
                                                     Activity
relative links.
Services
                           	
  
A service is something that can be started and
stopped. It doesn’t have UI. It is typically managed
by an activity. Music player,
for example
Service	
  Lifecycle	
  
Service also has a                                       Starting

lifecycle, but it’s                                                            (1) onCreate()
much simpler than                                                               (2) onStart()


activity’s. An activity                      onStart()

typically starts and
stops a service to do       Stopped                                                Running

some work for it in
the background.                                                     onStop()

Such as play music,
check for new               onDestroy()
                                or

tweets, etc.
                          <process killed>
                                                    Destroyed
Content	
  Providers
                               	
  
Content Providers share                    Content
content with applications                  Provider

across application           Content URI

boundaries.                    insert()

Examples of built-in          update()

Content Providers are:         delete()

Contacts, MediaStore,          query()

Settings and more.
Broadcast	
  Receivers
                                	
  




An Intent-based publish-subscribe mechanism. Great for listening
system events such as SMS messages.
DEBUGGING	
  	
  
ANDROID	
  APPS	
  
LogCat
                              	
  
The universal, most
versatile way to track
what is going on in
your app.

Can be viewed via
command line or
Eclipse.

Logs can be
generated both from
SDK Java code, or
low-level C code via
Bionic libc extension.
Debugger
                                    	
  




Your standard debugger is included in SDK, with all the usual bells & whistles.
TraceView	
  




TraceView helps you profile you application and find bottlenecks. It shows
execution of various calls through the entire stack. You can zoom into specific
calls.
Hierarchy	
  Viewer
                                          	
  
Hierarchy Viewer helps
you analyze your User
Interface.

Base UI tends to be the
most “expensive” part of
your application, this tool
is very useful.
Summary	
  
     Android is based on Java.

     You write Java code, but technically
     don’t run it.

     Java is augmented with XML, mostly
     for UI purposes.

     Android Java is mostly based on Java
     SE with replacement UI libraries.


     Marko Gargenta, Marakana.com
     marko@marakana.com
     +1-415-647-7000


     Licensed under Creative Commons
     License (cc-by-nc-nd). Please Share!

Más contenido relacionado

La actualidad más candente

Build UI of the Future with React 360
Build UI of the Future with React 360Build UI of the Future with React 360
Build UI of the Future with React 360RapidValue
 
android layouts
android layoutsandroid layouts
android layoutsDeepa Rani
 
Android Tutorials : Basic widgets
Android Tutorials : Basic widgetsAndroid Tutorials : Basic widgets
Android Tutorials : Basic widgetsPrajyot Mainkar
 
Android application development the basics (2)
Android application development the basics (2)Android application development the basics (2)
Android application development the basics (2)Aliyu Olalekan
 
Android Study Jam 2
Android Study Jam 2Android Study Jam 2
Android Study Jam 2DSC GVP
 
Application Development - Overview on Android OS
Application Development - Overview on Android OSApplication Development - Overview on Android OS
Application Development - Overview on Android OSPankaj Maheshwari
 
Android Screen Containers & Layouts
Android Screen Containers & LayoutsAndroid Screen Containers & Layouts
Android Screen Containers & LayoutsVijay Rastogi
 
What's new in android 4.4 - Romain Guy & Chet Haase
What's new in android 4.4 - Romain Guy & Chet HaaseWhat's new in android 4.4 - Romain Guy & Chet Haase
What's new in android 4.4 - Romain Guy & Chet HaaseParis Android User Group
 
Android ui layout
Android ui layoutAndroid ui layout
Android ui layoutKrazy Koder
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidShrijan Tiwari
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorialEd Zel
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorialkatayoon_bz
 
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3Paris Android User Group
 
How to create ui using droid draw
How to create ui using droid drawHow to create ui using droid draw
How to create ui using droid drawinfo_zybotech
 

La actualidad más candente (20)

Build UI of the Future with React 360
Build UI of the Future with React 360Build UI of the Future with React 360
Build UI of the Future with React 360
 
android layouts
android layoutsandroid layouts
android layouts
 
Android Tutorials : Basic widgets
Android Tutorials : Basic widgetsAndroid Tutorials : Basic widgets
Android Tutorials : Basic widgets
 
Android application development the basics (2)
Android application development the basics (2)Android application development the basics (2)
Android application development the basics (2)
 
Android Study Jam 2
Android Study Jam 2Android Study Jam 2
Android Study Jam 2
 
Application Development - Overview on Android OS
Application Development - Overview on Android OSApplication Development - Overview on Android OS
Application Development - Overview on Android OS
 
Android Screen Containers & Layouts
Android Screen Containers & LayoutsAndroid Screen Containers & Layouts
Android Screen Containers & Layouts
 
What's new in android 4.4 - Romain Guy & Chet Haase
What's new in android 4.4 - Romain Guy & Chet HaaseWhat's new in android 4.4 - Romain Guy & Chet Haase
What's new in android 4.4 - Romain Guy & Chet Haase
 
Android layouts
Android layoutsAndroid layouts
Android layouts
 
Android ui layout
Android ui layoutAndroid ui layout
Android ui layout
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android components
Android componentsAndroid components
Android components
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
Introduction to Honeycomb APIs - Android Developer Lab 2011 Q3
 
Designing Apps for the Motorola XOOM
Designing Apps for the Motorola XOOM Designing Apps for the Motorola XOOM
Designing Apps for the Motorola XOOM
 
01 08 - graphical user interface - layouts
01  08 - graphical user interface - layouts01  08 - graphical user interface - layouts
01 08 - graphical user interface - layouts
 
How to create ui using droid draw
How to create ui using droid drawHow to create ui using droid draw
How to create ui using droid draw
 
Android tutorial
Android tutorialAndroid tutorial
Android tutorial
 

Destacado

Career In Financing Administration
Career In Financing AdministrationCareer In Financing Administration
Career In Financing Administrationbluishlion
 
Future Uses Of Computer
Future Uses Of ComputerFuture Uses Of Computer
Future Uses Of Computermsanchezg001
 
Creating A Positive Classroom Environment 1192954359997023 3
Creating A Positive Classroom Environment 1192954359997023 3Creating A Positive Classroom Environment 1192954359997023 3
Creating A Positive Classroom Environment 1192954359997023 3smszyco
 
【労働者健康福祉機構】平成18年度環境報告書
【労働者健康福祉機構】平成18年度環境報告書【労働者健康福祉機構】平成18年度環境報告書
【労働者健康福祉機構】平成18年度環境報告書env25
 
Shortguideto Flashmeeting[1]
Shortguideto Flashmeeting[1]Shortguideto Flashmeeting[1]
Shortguideto Flashmeeting[1]Pasi Siltakorpi
 
Lyons Brown Bag Afc 20091112
Lyons Brown Bag Afc 20091112Lyons Brown Bag Afc 20091112
Lyons Brown Bag Afc 20091112Bertram Lyons
 
4.Oracle Day Sigortacili Mali Isler
4.Oracle Day Sigortacili Mali Isler4.Oracle Day Sigortacili Mali Isler
4.Oracle Day Sigortacili Mali IslerErmando
 
The Gasoline Brothers spelen band 2.0 met Twitter, Facebook, blog en een 'gra...
The Gasoline Brothers spelen band 2.0 met Twitter, Facebook, blog en een 'gra...The Gasoline Brothers spelen band 2.0 met Twitter, Facebook, blog en een 'gra...
The Gasoline Brothers spelen band 2.0 met Twitter, Facebook, blog en een 'gra...gasolinebrother
 
Railsservers
RailsserversRailsservers
RailsserversArrrrCamp
 
IBM Training Presentation
IBM Training PresentationIBM Training Presentation
IBM Training Presentationdkmorgan51
 
Wellspiration 6 - Fighting Heart Disease Naturally
Wellspiration 6  - Fighting Heart Disease NaturallyWellspiration 6  - Fighting Heart Disease Naturally
Wellspiration 6 - Fighting Heart Disease NaturallyYafa Sakkejha
 
Samantha Jamson, University of Leeds
Samantha Jamson, University of LeedsSamantha Jamson, University of Leeds
Samantha Jamson, University of LeedseuroFOT
 

Destacado (20)

Validation
ValidationValidation
Validation
 
Arte Polimaterica
Arte PolimatericaArte Polimaterica
Arte Polimaterica
 
About Me
About MeAbout Me
About Me
 
Career In Financing Administration
Career In Financing AdministrationCareer In Financing Administration
Career In Financing Administration
 
feelings
feelingsfeelings
feelings
 
Future Uses Of Computer
Future Uses Of ComputerFuture Uses Of Computer
Future Uses Of Computer
 
Creating A Positive Classroom Environment 1192954359997023 3
Creating A Positive Classroom Environment 1192954359997023 3Creating A Positive Classroom Environment 1192954359997023 3
Creating A Positive Classroom Environment 1192954359997023 3
 
【労働者健康福祉機構】平成18年度環境報告書
【労働者健康福祉機構】平成18年度環境報告書【労働者健康福祉機構】平成18年度環境報告書
【労働者健康福祉機構】平成18年度環境報告書
 
Shortguideto Flashmeeting[1]
Shortguideto Flashmeeting[1]Shortguideto Flashmeeting[1]
Shortguideto Flashmeeting[1]
 
Lyons Brown Bag Afc 20091112
Lyons Brown Bag Afc 20091112Lyons Brown Bag Afc 20091112
Lyons Brown Bag Afc 20091112
 
4.Oracle Day Sigortacili Mali Isler
4.Oracle Day Sigortacili Mali Isler4.Oracle Day Sigortacili Mali Isler
4.Oracle Day Sigortacili Mali Isler
 
The Gasoline Brothers spelen band 2.0 met Twitter, Facebook, blog en een 'gra...
The Gasoline Brothers spelen band 2.0 met Twitter, Facebook, blog en een 'gra...The Gasoline Brothers spelen band 2.0 met Twitter, Facebook, blog en een 'gra...
The Gasoline Brothers spelen band 2.0 met Twitter, Facebook, blog en een 'gra...
 
Guida base Adobe Illustrator CS 5.5
Guida base Adobe Illustrator CS 5.5Guida base Adobe Illustrator CS 5.5
Guida base Adobe Illustrator CS 5.5
 
Railsservers
RailsserversRailsservers
Railsservers
 
418 Sunum
418 Sunum418 Sunum
418 Sunum
 
IBM Training Presentation
IBM Training PresentationIBM Training Presentation
IBM Training Presentation
 
PrimaProva01
PrimaProva01PrimaProva01
PrimaProva01
 
Wellspiration 6 - Fighting Heart Disease Naturally
Wellspiration 6  - Fighting Heart Disease NaturallyWellspiration 6  - Fighting Heart Disease Naturally
Wellspiration 6 - Fighting Heart Disease Naturally
 
How To Motivate People
How To Motivate PeopleHow To Motivate People
How To Motivate People
 
Samantha Jamson, University of Leeds
Samantha Jamson, University of LeedsSamantha Jamson, University of Leeds
Samantha Jamson, University of Leeds
 

Similar a Marakana android-java developers

Android OS & SDK - Getting Started
Android OS & SDK - Getting StartedAndroid OS & SDK - Getting Started
Android OS & SDK - Getting StartedHemant Chhapoliya
 
Android presentation
Android presentationAndroid presentation
Android presentationImam Raza
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recieversJagdish Gediya
 
Android application development
Android application developmentAndroid application development
Android application developmentslidesuren
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1Hussain Behestee
 
Android应用开发简介
Android应用开发简介Android应用开发简介
Android应用开发简介easychen
 
Android studio
Android studioAndroid studio
Android studioAndri Yabu
 
Refactoring Wunderlist. UA Mobile 2016.
Refactoring Wunderlist. UA Mobile 2016.Refactoring Wunderlist. UA Mobile 2016.
Refactoring Wunderlist. UA Mobile 2016.UA Mobile
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a NutshellAleix Solé
 
Build Mobile Application In Android
Build Mobile Application In AndroidBuild Mobile Application In Android
Build Mobile Application In Androiddnnddane
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recieversUtkarsh Mankad
 
Technology and Android.pptx
Technology and Android.pptxTechnology and Android.pptx
Technology and Android.pptxmuthulakshmi cse
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android DevelopmentProf. Erwin Globio
 
android-tutorial-for-beginner
android-tutorial-for-beginnerandroid-tutorial-for-beginner
android-tutorial-for-beginnerAjailal Parackal
 

Similar a Marakana android-java developers (20)

cpuk10745
cpuk10745cpuk10745
cpuk10745
 
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.pptUnit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
 
Android OS & SDK - Getting Started
Android OS & SDK - Getting StartedAndroid OS & SDK - Getting Started
Android OS & SDK - Getting Started
 
Android presentation
Android presentationAndroid presentation
Android presentation
 
Android dev o_auth
Android dev o_authAndroid dev o_auth
Android dev o_auth
 
Android
AndroidAndroid
Android
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recievers
 
Android application development
Android application developmentAndroid application development
Android application development
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1
 
Android应用开发简介
Android应用开发简介Android应用开发简介
Android应用开发简介
 
Android platform
Android platform Android platform
Android platform
 
Android studio
Android studioAndroid studio
Android studio
 
Refactoring Wunderlist. UA Mobile 2016.
Refactoring Wunderlist. UA Mobile 2016.Refactoring Wunderlist. UA Mobile 2016.
Refactoring Wunderlist. UA Mobile 2016.
 
Android Development in a Nutshell
Android Development in a NutshellAndroid Development in a Nutshell
Android Development in a Nutshell
 
Build Mobile Application In Android
Build Mobile Application In AndroidBuild Mobile Application In Android
Build Mobile Application In Android
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recievers
 
Technology and Android.pptx
Technology and Android.pptxTechnology and Android.pptx
Technology and Android.pptx
 
Unlocking Android
Unlocking AndroidUnlocking Android
Unlocking Android
 
Introduction to Android Development
Introduction to Android DevelopmentIntroduction to Android Development
Introduction to Android Development
 
android-tutorial-for-beginner
android-tutorial-for-beginnerandroid-tutorial-for-beginner
android-tutorial-for-beginner
 

Más de Marko Gargenta

LTE: Building New Killer Apps
LTE: Building New Killer AppsLTE: Building New Killer Apps
LTE: Building New Killer AppsMarko Gargenta
 
Android Beyond The Phone
Android Beyond The PhoneAndroid Beyond The Phone
Android Beyond The PhoneMarko Gargenta
 
Android for Java Developers
Android for Java DevelopersAndroid for Java Developers
Android for Java DevelopersMarko Gargenta
 
Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010Marko Gargenta
 
Android: A 9,000-foot Overview
Android: A 9,000-foot OverviewAndroid: A 9,000-foot Overview
Android: A 9,000-foot OverviewMarko Gargenta
 
Marakana Android Internals
Marakana Android InternalsMarakana Android Internals
Marakana Android InternalsMarko Gargenta
 
Android For Managers Slides
Android For Managers SlidesAndroid For Managers Slides
Android For Managers SlidesMarko Gargenta
 
Why Python by Marilyn Davis, Marakana
Why Python by Marilyn Davis, MarakanaWhy Python by Marilyn Davis, Marakana
Why Python by Marilyn Davis, MarakanaMarko Gargenta
 
Jens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardJens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardMarko Gargenta
 
Jens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardJens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardMarko Gargenta
 

Más de Marko Gargenta (16)

Open Android
Open AndroidOpen Android
Open Android
 
LTE: Building New Killer Apps
LTE: Building New Killer AppsLTE: Building New Killer Apps
LTE: Building New Killer Apps
 
Java Champion Wanted
Java Champion WantedJava Champion Wanted
Java Champion Wanted
 
Android Beyond The Phone
Android Beyond The PhoneAndroid Beyond The Phone
Android Beyond The Phone
 
Android for Java Developers
Android for Java DevelopersAndroid for Java Developers
Android for Java Developers
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Android Deep Dive
Android Deep DiveAndroid Deep Dive
Android Deep Dive
 
Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010Android for Java Developers at OSCON 2010
Android for Java Developers at OSCON 2010
 
Android: A 9,000-foot Overview
Android: A 9,000-foot OverviewAndroid: A 9,000-foot Overview
Android: A 9,000-foot Overview
 
Marakana Android Internals
Marakana Android InternalsMarakana Android Internals
Marakana Android Internals
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Scrum Overview
Scrum OverviewScrum Overview
Scrum Overview
 
Android For Managers Slides
Android For Managers SlidesAndroid For Managers Slides
Android For Managers Slides
 
Why Python by Marilyn Davis, Marakana
Why Python by Marilyn Davis, MarakanaWhy Python by Marilyn Davis, Marakana
Why Python by Marilyn Davis, Marakana
 
Jens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardJens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So Hard
 
Jens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So HardJens Østergaard on Why Scrum Is So Hard
Jens Østergaard on Why Scrum Is So Hard
 

Último

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 

Último (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

Marakana android-java developers

  • 1. Android  For  Java   Developers   Marko  Gargenta   Marakana  
  • 2. Agenda   •  Android  History   •  Android  and  Java   •  Android  SDK   •  Hello  World!   •  Main  Building  Blocks   •  Debugging   •  Summary  
  • 3. History   2005   Google  buys  Android,  Inc.   Work  on  Dalvik  starts   2007   OHA  Announced   Early  SDK   2008   G1  Announced   SDK  1.0  Released   2009   G2  Released   Cupcake,  Donut,  Eclair  
  • 4. Android  and  Java   Android Java = Java SE – AWT/Swing + Android API
  • 5. Android  SDK  -­‐  What’s  in  the  box   SDK Tools Docs Platforms Data Skins Images Samples Add-ons Google Maps
  • 6. The  Tools   Tools are important part of the SDK. They are available via Eclipse plugin as well as command line shell.
  • 8. Create  New  Project   Use the Eclipse tool to create a new Android project. Here are some key constructs: Project   Eclipse  construct   Target   minimum  to  run   App  name   whatever   Package   Java  package   AcXvity   Java  class  
  • 9. The  Manifest  File   <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.marakana" android:versionCode="1" android:versionName="1.0"> <application android:icon="@drawable/icon" android:label="@string/app_name"> <activity android:name=".HelloAndroid" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> <uses-sdk android:minSdkVersion="5" /> </manifest>
  • 10. The  Layout  Resource   <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" /> </LinearLayout>
  • 11. The  Java  File   package com.marakana; import android.app.Activity; import android.os.Bundle; public class HelloAndroid extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } }
  • 14. AcXviXes   Activity is to an Android Application application what a Main Activity Another Another Activity Activity web page is to a website. Sort of.
  • 15. AcXvity  Lifecycle   Starting Activities have a well- (1) onCreate() (2) onStart() (3) onRestoreInstanceState() defined lifecycle. The (4) onResume() Android OS manages your activity by Running changing its state. (3) onResume() (2) onStart() (1) onSaveInstanceState() (2) onPause() You fill in the blanks. (1) onRestart() onResume() (1) onSaveInstanceState() Stopped (2) onStop() Paused onDestroy() or <process killed> <process killed> Destroyed
  • 16. Intents   Intents are to Android Application Android apps Another Main Activity Intent what hyperlinks Activity are to websites. They can be Intent implicit and Android Application explicit. Sort of like absolute and Main Activity Intent Another Activity relative links.
  • 17. Services   A service is something that can be started and stopped. It doesn’t have UI. It is typically managed by an activity. Music player, for example
  • 18. Service  Lifecycle   Service also has a Starting lifecycle, but it’s (1) onCreate() much simpler than (2) onStart() activity’s. An activity onStart() typically starts and stops a service to do Stopped Running some work for it in the background. onStop() Such as play music, check for new onDestroy() or tweets, etc. <process killed> Destroyed
  • 19. Content  Providers   Content Providers share Content content with applications Provider across application Content URI boundaries. insert() Examples of built-in update() Content Providers are: delete() Contacts, MediaStore, query() Settings and more.
  • 20. Broadcast  Receivers   An Intent-based publish-subscribe mechanism. Great for listening system events such as SMS messages.
  • 22. LogCat   The universal, most versatile way to track what is going on in your app. Can be viewed via command line or Eclipse. Logs can be generated both from SDK Java code, or low-level C code via Bionic libc extension.
  • 23. Debugger   Your standard debugger is included in SDK, with all the usual bells & whistles.
  • 24. TraceView   TraceView helps you profile you application and find bottlenecks. It shows execution of various calls through the entire stack. You can zoom into specific calls.
  • 25. Hierarchy  Viewer   Hierarchy Viewer helps you analyze your User Interface. Base UI tends to be the most “expensive” part of your application, this tool is very useful.
  • 26. Summary   Android is based on Java. You write Java code, but technically don’t run it. Java is augmented with XML, mostly for UI purposes. Android Java is mostly based on Java SE with replacement UI libraries. Marko Gargenta, Marakana.com marko@marakana.com +1-415-647-7000 Licensed under Creative Commons License (cc-by-nc-nd). Please Share!