SlideShare a Scribd company logo
presents:




Android Java J2EE Specialist




          Author of

available on




                               1
•Android in numbers


•Installing the work space


•Creating a project


•Using DDMS perspective


•Using DDMS perspective and Eclipse Debug Bridge


•Tracking memory leaks




                                                   2
Android Trainer Consultant Expert
                                     mathias.seguy.it@gmail.com (mail)
                                            @android2ee (twitter)
                        Author of eBooks on Android programming (Android2ee.com)
                                       Android Speaker and Teacher
                                     Fundamentals Mathematics Doctor
                         Technical expert of the “Agence Nationale de la Recherche”
                                         Developpez.com Redactor
                      Android Blogs : Android2EE sur DVP et Android2ee sur BlogSpot
Fundamentals
 Mathematics                                                                                        Android2EE
    PHD                                 Via CapGemini                     Via Sopra                    Birth
        Siemens     Magnus        DGA        CNES        Airbus        Airbus      Airbus        STI         Android2
          VDO                                                                                                  EE
  03        04          05         06           07           08               09         10        11         12
                                                              Java J2EE
                                                                                                        Android
                                             Manager     Manager                               Technical
        Developer   Developer   GUI Leader   Technical   Technical     Manager     Technical    Director     Android2EE
                                              Leader      Leader                    Leader                    Founder


ENSEEIHT‟s IT                                                        At STI
   Master

                                                                                                                          3
4
•2003 Android Inc creation
•2005 Google bought Android
•2007 Open Handset Alliance birth
•2007 Android Beta SDK released




   In 3 years, from September 2008 to
   November 2011, 8 major versions of the
   system are delivered by Google



                                            5
Android in numbers:
•   27% of mobiles are smart phones (World Wild, 2011);
•   52.5% of smart phones are Android phones (World Wild, Dec 2011);
•   1 smart phone over two sold is an Android Phone (US, Dec 2011);
•   +17391% of available applications on GooglePlay in 3 years;
•   +500 000 applications in GooglePlay (April 2012);
•   +15 000 000 downloads (May 2012);
•   2012 will be the Android Tablet year.

Ok, today, Android is the smart phones OS winner.
But tomorrow, Android will be everywhere: mobile, tablet, TV, watches, Hifi, car, appliances, home automation
Everywhere, I tell you.




                                                                                                                6
7
It‟s pretty easy:
First:
•       Download Java
       (http://www.oracle.com/technetwork/java/javase/do
       wnloads/index.html) and install it;
•      Download Eclipse
       (http://www.eclipse.org/downloads/) and install it;
•      Download the Android SDK
       (http://developer.android.com/sdk/index.html) and
       unzip it.

In Eclipse, add the Android plugin:
•    Go in Help/install New software. Click Add and
     set Android and https://dl-
     ssl.google.com/android/eclipse/
•    Select all the elements, click next and finish.

Restart Eclipse :
•    In WindowPreference select Android et set the
     Android SDK path (the folder in which you unzip
     the Android SDK)

Ok, it‟s done, you can code Android program.
Now open the SDK Manager

And launch the update/installation (Android SDK Tools,
     platform-tools, SDK, documentation,…).
A long download is waiting for you.




Then define Android Virtual Device (Emulator) for tests.
Now open the SDK Manager


A quick glance at the window.
Open the AVD window.
Open the AVD window.
Select new.
Define a new Emulator:
•    Name
•    Target
•    SD card size
•    Skin (resolution)
•    Hardware
13
Let‟s create a first project a see :
•     Android “new project” Wizard
•     Android Manifest wysiwyg
•     Android Layout wysiwyg
•     Android resources wysiwyg




                                       14
Let‟s create a first project a see :
File->new->Others…-> Android Project and follow the wizard:
Project Name, Project SDK to target,




                                                              15
Let‟s create a first project a see :
File->new->Others…-> Android Project and follow the wizard:
Project Name, Project SDK to target, Application name, Package name, Activity name, min SDK,
Project created




                                                                                               16
17
18
19
20
Open the DDMS perspective.
•   Devices
•   Emulator Control
•   Set of action buttons
•   File Explorer
•   Resource explorer
•   Lint Warning
•   LogCat




                             21
Status   Version/Tid/Pid

Devices Connected




 Avaiable Processes
      to watch




                                                 22
Control the emulator telephony status




 Emulate a phone call to the emulator
  Emulate the reception of an SMS




Control the emulator geo-location using:
            Your own lat/long
               A GPX file
               A KML file




                                           23
Screen
                       Debug            Heap              Thread      Stop     Capture
                                                                                             Take a
                                                                                             screen
                                                                                              shoot



Strart the « Debug »                                                                       Stop a process
    on a Process
                                                                                           Begin CPU time
                     Begin the Heap             Cause Garbage                                 tracking
                   tracking using the          Collector usefull to
                       Heap View               update heap stats        Begin threads
                                                                      tracking using the
                                 Dump the Heap                          Threads View
                               within Eclipse (using
                                 MAT) or in a file




                                                                                                            24
Create a folder


   Delete a file


Push a file onto the
      device


Pull a file from the
      device




                       25
Ressources used by
                      the process




Selected process




                                        26
List all the problems found in the workspace, a PMD like dedicated to Android




Description                 Category            Location            Description of the rule




                                                                                              27
28
29
Using the Debug mode with
the DDMS perspective.
•    Allocation tracker
•    Heap tracking
•    Threads tracking
•    Heap Dump




                            30
31
32
33
34
35
It‟s quiet simple:                                 Thread I.H.M                      Thread de traitement
Link an activity with a life cycle and a      Activity         Handler
      thread with no management                                                         sendMessage(
      between the thread lifecycle and the                                                   )

                                                              message


                                                         OnDestroy()
                                                         OnCreate()

                                                                                 Thread de traitement initiale

                                                  Thread I.H.M                           sendMessage
                                                                                              ()

                                              Activity        Handler
                                             fantôme          fantôme

                                                                                     Thread de traitement
                                             Activity          Handler
                                                                                         sendMessage(
                                                                                              )
                                                                       message




                                                                                                                 36
Application


 Main
Activity      Handler   Thread 1




                                   37
Application
 Main
Activity 1   Handler 1   Thread 1




 Main
Activity 2   Handler 2   Thread 2




                                    38
Application
 Main
Activity 1   Handler 1   Thread 1




 Main
Activity 2   Handler 2   Thread 2




 Main
Activity 3   Handler 3   Thread 3




                                    39
Shallow heap is the memory consumed by one object.                         GC Root
                                                                                     S=100
Retained set of X is the set of objects which would be                               R=400
removed by GC when X is garbage collected.

Retained heap of X is the sum of shallow sizes of all objects
in the retained set of X, i.e. memory kept alive by X.

Generally speaking, shallow heap of an object is its size in the
heap and retained size of the same object is the amount of         S=100                     S=100
heap memory that will be freed when the object is garbage          R=200                     R=100
collected.




                                                                   S=100
                                                                   R=100




                                                                                                     40
Using the Debug mode with
the DDMS perspective.
•    Allocation tracker
•    Heap tracking
•    Threads tracking
•    Heap Dump

•   Save the heap,
•   Convert the heap using: hpro-conv dump.hprof dump-converted.hprof
•   D:Eclipseeclipsex64_indigo_Androidandroid-sdktools>hprof-conv.exe
    D:AndroidConferenceEclipseDayToulousehrpofcom.android2ee.tuto.thread.orphan.hprof
    D:AndroidConferenceEclipseDayToulousehrpofcom.android2ee.tuto.thread.orphan.converted.prof




                                                                                                      41
•     Open it in MAT the converted hprof
    •    Dominator tree => We detect our Thread




                                                  42
•     Open it in MAT the converted hprof
    •    Dominator tree => We detect our Thread




                                                  43
•     Now, open the Histogram View
    •    Choose byte[] and select “list object with incoming reference”




                                                                          44
•     Now, open the Histogram View
    •    Choose byte[] and select “list object with incoming reference”
    •    Open the items and fall on your class and select “list object with incoming reference”




                                                                                                  45
•     Now, open the Histogram View
    •    Choose byte[] and select “list object with incoming reference”
    •    Open the items and fall on your class and select “list object with incoming reference”
    •    Find again the duplicated activity




                                                                                                  46
•     Now, open the Histogram View
    •    Choose byte[] and select “list object with incoming reference”
    •    Open the items and fall on your class and select “list object with incoming reference”
    •    Find again the duplicated activity
        Open one of then and Just look at the Handler and the Background Thread => Leak Resolved




                                                                                                    47
This presentation has used the following references:
           •     Android2ee„s Ebooks and tutorials : http://www.android2ee.com
           •     Android web sites:
                    •  http://developer.android.com/index.html
                    •  http://android-developers.blogspot.fr/
                    •  http://www.google.com/events/io/2011/sessions.html
           •     Android Design Guide: http://developer.android.com/design/index.html

On Android2ee, you‟ll find the following tutorials:
                    •   Sensors
                    •   Threads, handlers and memory leaks
                    •   AppWidgets
                    •   Dynamic GUI creation
                    •   REST Services
                    •   RSS reader
                    •   Use Maven for Android projects
                    •   Deliver on GooglePlay

Sur developpez.com vous trouverez les articles suivants (français seulement):
                    •Déployer son application Android et obtenir sa clef MapView.
                    •Construire dynamiquement ses IHM Android
                    •Les capteurs Android
                    •Thread, Handler, AsyncTask et fuites mémoires
                    •Investir l'écran d'accueil Android avec les AppWidgets
                    •Android, Livrer son projet sur GooglePlay




                                                                                        48
.




                                 Thanks for your attention.


                                     android2ee.com.              See you in:
                                                                  Brazzaville
                                       #android2ee                In September
                                mathias.seguy.it@gmail.com
MySensors, MyLight et MyTorch
   available on GooglePlay

                                                                                 49

More Related Content

What's hot

JavaYDL16
JavaYDL16JavaYDL16
JavaYDL16
Terry Yoast
 
GENERATOR V1.0 (Shenzhen)
GENERATOR V1.0 (Shenzhen)GENERATOR V1.0 (Shenzhen)
GENERATOR V1.0 (Shenzhen)
HAX
 
Android executable modeling: beyond android programming
Android executable modeling: beyond android programmingAndroid executable modeling: beyond android programming
Android executable modeling: beyond android programmingOlivier Le Goaër
 
Top Tips for Android UIs
Top Tips for Android UIsTop Tips for Android UIs
Top Tips for Android UIs
Motorola Mobility - MOTODEV
 
Backend, app e internet das coisas com NodeJS no Google Cloud Platform
Backend, app e internet das coisas com NodeJS no Google Cloud PlatformBackend, app e internet das coisas com NodeJS no Google Cloud Platform
Backend, app e internet das coisas com NodeJS no Google Cloud Platform
Alvaro Viebrantz
 
Local Notification Tutorial
Local Notification TutorialLocal Notification Tutorial
Local Notification Tutorial
Ketan Raval
 

What's hot (6)

JavaYDL16
JavaYDL16JavaYDL16
JavaYDL16
 
GENERATOR V1.0 (Shenzhen)
GENERATOR V1.0 (Shenzhen)GENERATOR V1.0 (Shenzhen)
GENERATOR V1.0 (Shenzhen)
 
Android executable modeling: beyond android programming
Android executable modeling: beyond android programmingAndroid executable modeling: beyond android programming
Android executable modeling: beyond android programming
 
Top Tips for Android UIs
Top Tips for Android UIsTop Tips for Android UIs
Top Tips for Android UIs
 
Backend, app e internet das coisas com NodeJS no Google Cloud Platform
Backend, app e internet das coisas com NodeJS no Google Cloud PlatformBackend, app e internet das coisas com NodeJS no Google Cloud Platform
Backend, app e internet das coisas com NodeJS no Google Cloud Platform
 
Local Notification Tutorial
Local Notification TutorialLocal Notification Tutorial
Local Notification Tutorial
 

Viewers also liked

Conférence "Architecture Android" du 19 Mars 2013 par Mathias Seguy fondateur...
Conférence "Architecture Android" du 19 Mars 2013 par Mathias Seguy fondateur...Conférence "Architecture Android" du 19 Mars 2013 par Mathias Seguy fondateur...
Conférence "Architecture Android" du 19 Mars 2013 par Mathias Seguy fondateur...
Mathias Seguy
 
Mise en place de l'ActionBarCompat dans vos projets Android.
Mise en place de l'ActionBarCompat dans vos projets Android.Mise en place de l'ActionBarCompat dans vos projets Android.
Mise en place de l'ActionBarCompat dans vos projets Android.
Mathias Seguy
 
Android un nouveau futur s'ouvre à nous
Android un nouveau futur s'ouvre à nousAndroid un nouveau futur s'ouvre à nous
Android un nouveau futur s'ouvre à nous
Mathias Seguy
 
CocoaHeads An Android Overview (fr)
CocoaHeads An Android Overview (fr)CocoaHeads An Android Overview (fr)
CocoaHeads An Android Overview (fr)
Mathias Seguy
 
Treatment, Architecture and Threads
Treatment, Architecture and ThreadsTreatment, Architecture and Threads
Treatment, Architecture and Threads
Mathias Seguy
 
Architecture et Bonnes pratiques Android #DevoxxFr2016 Part2
Architecture et Bonnes pratiques Android #DevoxxFr2016 Part2Architecture et Bonnes pratiques Android #DevoxxFr2016 Part2
Architecture et Bonnes pratiques Android #DevoxxFr2016 Part2
Mathias Seguy
 
Animate Me! if you don't do it for me, do it for Chet - DroidconLondon2015
Animate Me! if you don't do it for me, do it for Chet - DroidconLondon2015Animate Me! if you don't do it for me, do it for Chet - DroidconLondon2015
Animate Me! if you don't do it for me, do it for Chet - DroidconLondon2015
Mathias Seguy
 
The 2016 Android Developer Toolbox [NANTES]
The 2016 Android Developer Toolbox [NANTES]The 2016 Android Developer Toolbox [NANTES]
The 2016 Android Developer Toolbox [NANTES]
Nilhcem
 
Voyage en monde Android. Trucs et astuces tout au long de la route.
Voyage en monde Android. Trucs et astuces tout au long de la route.Voyage en monde Android. Trucs et astuces tout au long de la route.
Voyage en monde Android. Trucs et astuces tout au long de la route.
Mathias Seguy
 
Animate Me, if you don't do it for me do it for chet (DroidCon Paris)
Animate Me, if you don't do it for me do it for chet (DroidCon Paris)Animate Me, if you don't do it for me do it for chet (DroidCon Paris)
Animate Me, if you don't do it for me do it for chet (DroidCon Paris)
Mathias Seguy
 
Android2EE training: Tutorials list of Android projects
Android2EE training: Tutorials list of Android projectsAndroid2EE training: Tutorials list of Android projects
Android2EE training: Tutorials list of Android projects
Mathias Seguy
 
Animate me, If you don't do it for me do it for Chet :)
Animate me, If you don't do it for me do it for Chet :)Animate me, If you don't do it for me do it for Chet :)
Animate me, If you don't do it for me do it for Chet :)
Mathias Seguy
 
Présentation et bonnes pratiques du pattern MVVM - MIC Belgique
Présentation et bonnes pratiques du pattern MVVM - MIC BelgiquePrésentation et bonnes pratiques du pattern MVVM - MIC Belgique
Présentation et bonnes pratiques du pattern MVVM - MIC Belgique
Denis Voituron
 
Architecture et Bonnes pratiques Android #DevoxxFr2016 Part1
Architecture et Bonnes pratiques Android #DevoxxFr2016 Part1Architecture et Bonnes pratiques Android #DevoxxFr2016 Part1
Architecture et Bonnes pratiques Android #DevoxxFr2016 Part1
Mathias Seguy
 

Viewers also liked (14)

Conférence "Architecture Android" du 19 Mars 2013 par Mathias Seguy fondateur...
Conférence "Architecture Android" du 19 Mars 2013 par Mathias Seguy fondateur...Conférence "Architecture Android" du 19 Mars 2013 par Mathias Seguy fondateur...
Conférence "Architecture Android" du 19 Mars 2013 par Mathias Seguy fondateur...
 
Mise en place de l'ActionBarCompat dans vos projets Android.
Mise en place de l'ActionBarCompat dans vos projets Android.Mise en place de l'ActionBarCompat dans vos projets Android.
Mise en place de l'ActionBarCompat dans vos projets Android.
 
Android un nouveau futur s'ouvre à nous
Android un nouveau futur s'ouvre à nousAndroid un nouveau futur s'ouvre à nous
Android un nouveau futur s'ouvre à nous
 
CocoaHeads An Android Overview (fr)
CocoaHeads An Android Overview (fr)CocoaHeads An Android Overview (fr)
CocoaHeads An Android Overview (fr)
 
Treatment, Architecture and Threads
Treatment, Architecture and ThreadsTreatment, Architecture and Threads
Treatment, Architecture and Threads
 
Architecture et Bonnes pratiques Android #DevoxxFr2016 Part2
Architecture et Bonnes pratiques Android #DevoxxFr2016 Part2Architecture et Bonnes pratiques Android #DevoxxFr2016 Part2
Architecture et Bonnes pratiques Android #DevoxxFr2016 Part2
 
Animate Me! if you don't do it for me, do it for Chet - DroidconLondon2015
Animate Me! if you don't do it for me, do it for Chet - DroidconLondon2015Animate Me! if you don't do it for me, do it for Chet - DroidconLondon2015
Animate Me! if you don't do it for me, do it for Chet - DroidconLondon2015
 
The 2016 Android Developer Toolbox [NANTES]
The 2016 Android Developer Toolbox [NANTES]The 2016 Android Developer Toolbox [NANTES]
The 2016 Android Developer Toolbox [NANTES]
 
Voyage en monde Android. Trucs et astuces tout au long de la route.
Voyage en monde Android. Trucs et astuces tout au long de la route.Voyage en monde Android. Trucs et astuces tout au long de la route.
Voyage en monde Android. Trucs et astuces tout au long de la route.
 
Animate Me, if you don't do it for me do it for chet (DroidCon Paris)
Animate Me, if you don't do it for me do it for chet (DroidCon Paris)Animate Me, if you don't do it for me do it for chet (DroidCon Paris)
Animate Me, if you don't do it for me do it for chet (DroidCon Paris)
 
Android2EE training: Tutorials list of Android projects
Android2EE training: Tutorials list of Android projectsAndroid2EE training: Tutorials list of Android projects
Android2EE training: Tutorials list of Android projects
 
Animate me, If you don't do it for me do it for Chet :)
Animate me, If you don't do it for me do it for Chet :)Animate me, If you don't do it for me do it for Chet :)
Animate me, If you don't do it for me do it for Chet :)
 
Présentation et bonnes pratiques du pattern MVVM - MIC Belgique
Présentation et bonnes pratiques du pattern MVVM - MIC BelgiquePrésentation et bonnes pratiques du pattern MVVM - MIC Belgique
Présentation et bonnes pratiques du pattern MVVM - MIC Belgique
 
Architecture et Bonnes pratiques Android #DevoxxFr2016 Part1
Architecture et Bonnes pratiques Android #DevoxxFr2016 Part1Architecture et Bonnes pratiques Android #DevoxxFr2016 Part1
Architecture et Bonnes pratiques Android #DevoxxFr2016 Part1
 

Similar to Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_slideshare

Profiling Android Applications
Profiling Android ApplicationsProfiling Android Applications
Profiling Android Applications
hubx
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
natdefreitas
 
Ii 1300-java essentials for android
Ii 1300-java essentials for androidIi 1300-java essentials for android
Ii 1300-java essentials for android
Adrian Mikeliunas
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspective
Gunjan Kumar
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App Development
Andri Yadi
 
Improve Android System Component Performance
Improve Android System Component PerformanceImprove Android System Component Performance
Improve Android System Component Performance
National Cheng Kung University
 
Android app developers in bangalore- thorsignia
Android app developers in bangalore- thorsigniaAndroid app developers in bangalore- thorsignia
Android app developers in bangalore- thorsignia
charan Teja
 
Guides To Analyzing WebKit Performance
Guides To Analyzing WebKit PerformanceGuides To Analyzing WebKit Performance
Guides To Analyzing WebKit Performance
National Cheng Kung University
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
zeelpatel0504
 
PPT Companion to Android
PPT Companion to AndroidPPT Companion to Android
PPT Companion to Android
Dharani Kumar Madduri
 
Android Development: The Basics
Android Development: The BasicsAndroid Development: The Basics
Android Development: The Basics
Mike Desjardins
 
Session 2 beccse
Session 2 beccseSession 2 beccse
Session 2 beccse
vin123456gangal
 
Build Mobile Application In Android
Build Mobile Application In AndroidBuild Mobile Application In Android
Build Mobile Application In Androiddnnddane
 
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
"JavaME + Android in action" CCT-CEJUG Dezembro 2008"JavaME + Android in action" CCT-CEJUG Dezembro 2008
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
Vando Batista
 
Google Android @ AlphaCSP's JavaEdge
Google Android @ AlphaCSP's JavaEdgeGoogle Android @ AlphaCSP's JavaEdge
Google Android @ AlphaCSP's JavaEdge
yuvalb
 
Slides bootcamp21
Slides bootcamp21Slides bootcamp21
Slides bootcamp21
dxsaki
 
OS in mobile devices [Android]
OS in mobile devices [Android]OS in mobile devices [Android]
OS in mobile devices [Android]
Yatharth Aggarwal
 

Similar to Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_slideshare (20)

Profiling Android Applications
Profiling Android ApplicationsProfiling Android Applications
Profiling Android Applications
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
 
Ii 1300-java essentials for android
Ii 1300-java essentials for androidIi 1300-java essentials for android
Ii 1300-java essentials for android
 
Getting started with android dev and test perspective
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspective
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App Development
 
Improve Android System Component Performance
Improve Android System Component PerformanceImprove Android System Component Performance
Improve Android System Component Performance
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Android app developers in bangalore- thorsignia
Android app developers in bangalore- thorsigniaAndroid app developers in bangalore- thorsignia
Android app developers in bangalore- thorsignia
 
Android My Seminar
Android My SeminarAndroid My Seminar
Android My Seminar
 
Guides To Analyzing WebKit Performance
Guides To Analyzing WebKit PerformanceGuides To Analyzing WebKit Performance
Guides To Analyzing WebKit Performance
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Android Attacks
Android AttacksAndroid Attacks
Android Attacks
 
PPT Companion to Android
PPT Companion to AndroidPPT Companion to Android
PPT Companion to Android
 
Android Development: The Basics
Android Development: The BasicsAndroid Development: The Basics
Android Development: The Basics
 
Session 2 beccse
Session 2 beccseSession 2 beccse
Session 2 beccse
 
Build Mobile Application In Android
Build Mobile Application In AndroidBuild Mobile Application In Android
Build Mobile Application In Android
 
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
"JavaME + Android in action" CCT-CEJUG Dezembro 2008"JavaME + Android in action" CCT-CEJUG Dezembro 2008
"JavaME + Android in action" CCT-CEJUG Dezembro 2008
 
Google Android @ AlphaCSP's JavaEdge
Google Android @ AlphaCSP's JavaEdgeGoogle Android @ AlphaCSP's JavaEdge
Google Android @ AlphaCSP's JavaEdge
 
Slides bootcamp21
Slides bootcamp21Slides bootcamp21
Slides bootcamp21
 
OS in mobile devices [Android]
OS in mobile devices [Android]OS in mobile devices [Android]
OS in mobile devices [Android]
 

Recently uploaded

Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 

Recently uploaded (20)

Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 

Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_slideshare

  • 1. presents: Android Java J2EE Specialist Author of available on 1
  • 2. •Android in numbers •Installing the work space •Creating a project •Using DDMS perspective •Using DDMS perspective and Eclipse Debug Bridge •Tracking memory leaks 2
  • 3. Android Trainer Consultant Expert mathias.seguy.it@gmail.com (mail) @android2ee (twitter) Author of eBooks on Android programming (Android2ee.com) Android Speaker and Teacher Fundamentals Mathematics Doctor Technical expert of the “Agence Nationale de la Recherche” Developpez.com Redactor Android Blogs : Android2EE sur DVP et Android2ee sur BlogSpot Fundamentals Mathematics Android2EE PHD Via CapGemini Via Sopra Birth Siemens Magnus DGA CNES Airbus Airbus Airbus STI Android2 VDO EE 03 04 05 06 07 08 09 10 11 12 Java J2EE Android Manager Manager Technical Developer Developer GUI Leader Technical Technical Manager Technical Director Android2EE Leader Leader Leader Founder ENSEEIHT‟s IT At STI Master 3
  • 4. 4
  • 5. •2003 Android Inc creation •2005 Google bought Android •2007 Open Handset Alliance birth •2007 Android Beta SDK released In 3 years, from September 2008 to November 2011, 8 major versions of the system are delivered by Google 5
  • 6. Android in numbers: • 27% of mobiles are smart phones (World Wild, 2011); • 52.5% of smart phones are Android phones (World Wild, Dec 2011); • 1 smart phone over two sold is an Android Phone (US, Dec 2011); • +17391% of available applications on GooglePlay in 3 years; • +500 000 applications in GooglePlay (April 2012); • +15 000 000 downloads (May 2012); • 2012 will be the Android Tablet year. Ok, today, Android is the smart phones OS winner. But tomorrow, Android will be everywhere: mobile, tablet, TV, watches, Hifi, car, appliances, home automation Everywhere, I tell you. 6
  • 7. 7
  • 8. It‟s pretty easy: First: • Download Java (http://www.oracle.com/technetwork/java/javase/do wnloads/index.html) and install it; • Download Eclipse (http://www.eclipse.org/downloads/) and install it; • Download the Android SDK (http://developer.android.com/sdk/index.html) and unzip it. In Eclipse, add the Android plugin: • Go in Help/install New software. Click Add and set Android and https://dl- ssl.google.com/android/eclipse/ • Select all the elements, click next and finish. Restart Eclipse : • In WindowPreference select Android et set the Android SDK path (the folder in which you unzip the Android SDK) Ok, it‟s done, you can code Android program.
  • 9. Now open the SDK Manager And launch the update/installation (Android SDK Tools, platform-tools, SDK, documentation,…). A long download is waiting for you. Then define Android Virtual Device (Emulator) for tests.
  • 10. Now open the SDK Manager A quick glance at the window.
  • 11. Open the AVD window.
  • 12. Open the AVD window. Select new. Define a new Emulator: • Name • Target • SD card size • Skin (resolution) • Hardware
  • 13. 13
  • 14. Let‟s create a first project a see : • Android “new project” Wizard • Android Manifest wysiwyg • Android Layout wysiwyg • Android resources wysiwyg 14
  • 15. Let‟s create a first project a see : File->new->Others…-> Android Project and follow the wizard: Project Name, Project SDK to target, 15
  • 16. Let‟s create a first project a see : File->new->Others…-> Android Project and follow the wizard: Project Name, Project SDK to target, Application name, Package name, Activity name, min SDK, Project created 16
  • 17. 17
  • 18. 18
  • 19. 19
  • 20. 20
  • 21. Open the DDMS perspective. • Devices • Emulator Control • Set of action buttons • File Explorer • Resource explorer • Lint Warning • LogCat 21
  • 22. Status Version/Tid/Pid Devices Connected Avaiable Processes to watch 22
  • 23. Control the emulator telephony status Emulate a phone call to the emulator Emulate the reception of an SMS Control the emulator geo-location using: Your own lat/long A GPX file A KML file 23
  • 24. Screen Debug Heap Thread Stop Capture Take a screen shoot Strart the « Debug » Stop a process on a Process Begin CPU time Begin the Heap Cause Garbage tracking tracking using the Collector usefull to Heap View update heap stats Begin threads tracking using the Dump the Heap Threads View within Eclipse (using MAT) or in a file 24
  • 25. Create a folder Delete a file Push a file onto the device Pull a file from the device 25
  • 26. Ressources used by the process Selected process 26
  • 27. List all the problems found in the workspace, a PMD like dedicated to Android Description Category Location Description of the rule 27
  • 28. 28
  • 29. 29
  • 30. Using the Debug mode with the DDMS perspective. • Allocation tracker • Heap tracking • Threads tracking • Heap Dump 30
  • 31. 31
  • 32. 32
  • 33. 33
  • 34. 34
  • 35. 35
  • 36. It‟s quiet simple: Thread I.H.M Thread de traitement Link an activity with a life cycle and a Activity Handler thread with no management sendMessage( between the thread lifecycle and the ) message OnDestroy() OnCreate() Thread de traitement initiale Thread I.H.M sendMessage () Activity Handler fantôme fantôme Thread de traitement Activity Handler sendMessage( ) message 36
  • 37. Application Main Activity Handler Thread 1 37
  • 38. Application Main Activity 1 Handler 1 Thread 1 Main Activity 2 Handler 2 Thread 2 38
  • 39. Application Main Activity 1 Handler 1 Thread 1 Main Activity 2 Handler 2 Thread 2 Main Activity 3 Handler 3 Thread 3 39
  • 40. Shallow heap is the memory consumed by one object. GC Root S=100 Retained set of X is the set of objects which would be R=400 removed by GC when X is garbage collected. Retained heap of X is the sum of shallow sizes of all objects in the retained set of X, i.e. memory kept alive by X. Generally speaking, shallow heap of an object is its size in the heap and retained size of the same object is the amount of S=100 S=100 heap memory that will be freed when the object is garbage R=200 R=100 collected. S=100 R=100 40
  • 41. Using the Debug mode with the DDMS perspective. • Allocation tracker • Heap tracking • Threads tracking • Heap Dump • Save the heap, • Convert the heap using: hpro-conv dump.hprof dump-converted.hprof • D:Eclipseeclipsex64_indigo_Androidandroid-sdktools>hprof-conv.exe D:AndroidConferenceEclipseDayToulousehrpofcom.android2ee.tuto.thread.orphan.hprof D:AndroidConferenceEclipseDayToulousehrpofcom.android2ee.tuto.thread.orphan.converted.prof 41
  • 42. Open it in MAT the converted hprof • Dominator tree => We detect our Thread 42
  • 43. Open it in MAT the converted hprof • Dominator tree => We detect our Thread 43
  • 44. Now, open the Histogram View • Choose byte[] and select “list object with incoming reference” 44
  • 45. Now, open the Histogram View • Choose byte[] and select “list object with incoming reference” • Open the items and fall on your class and select “list object with incoming reference” 45
  • 46. Now, open the Histogram View • Choose byte[] and select “list object with incoming reference” • Open the items and fall on your class and select “list object with incoming reference” • Find again the duplicated activity 46
  • 47. Now, open the Histogram View • Choose byte[] and select “list object with incoming reference” • Open the items and fall on your class and select “list object with incoming reference” • Find again the duplicated activity  Open one of then and Just look at the Handler and the Background Thread => Leak Resolved 47
  • 48. This presentation has used the following references: • Android2ee„s Ebooks and tutorials : http://www.android2ee.com • Android web sites: • http://developer.android.com/index.html • http://android-developers.blogspot.fr/ • http://www.google.com/events/io/2011/sessions.html • Android Design Guide: http://developer.android.com/design/index.html On Android2ee, you‟ll find the following tutorials: • Sensors • Threads, handlers and memory leaks • AppWidgets • Dynamic GUI creation • REST Services • RSS reader • Use Maven for Android projects • Deliver on GooglePlay Sur developpez.com vous trouverez les articles suivants (français seulement): •Déployer son application Android et obtenir sa clef MapView. •Construire dynamiquement ses IHM Android •Les capteurs Android •Thread, Handler, AsyncTask et fuites mémoires •Investir l'écran d'accueil Android avec les AppWidgets •Android, Livrer son projet sur GooglePlay 48
  • 49. . Thanks for your attention. android2ee.com. See you in: Brazzaville #android2ee In September mathias.seguy.it@gmail.com MySensors, MyLight et MyTorch available on GooglePlay 49