Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_slideshare

Mathias Seguy
Mathias SeguyAndroid Expert at Android2EE à Android2EE
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
1 sur 49

Recommandé

ProTips DroidCon Paris 2013 par
ProTips DroidCon Paris 2013ProTips DroidCon Paris 2013
ProTips DroidCon Paris 2013Mathias Seguy
3.5K vues42 diapositives
Google Plus SignIn : l'Authentification Google par
Google Plus SignIn : l'Authentification GoogleGoogle Plus SignIn : l'Authentification Google
Google Plus SignIn : l'Authentification GoogleMathias Seguy
3.1K vues57 diapositives
Generating an Android App with Acceleo (Eclipse Summit Europe 2010) par
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)mikaelbarbero
1.6K vues59 diapositives
Getting started with immersive technologies par
Getting started with immersive technologiesGetting started with immersive technologies
Getting started with immersive technologiesUchechukwu Obimma
284 vues60 diapositives
Visual Studio Automation Object Model. EnvDTE interfaces par
Visual Studio Automation Object Model. EnvDTE interfacesVisual Studio Automation Object Model. EnvDTE interfaces
Visual Studio Automation Object Model. EnvDTE interfacesPVS-Studio
494 vues16 diapositives
ハンズオン資料 電話を作ろう(v1.6用) par
ハンズオン資料 電話を作ろう(v1.6用)ハンズオン資料 電話を作ろう(v1.6用)
ハンズオン資料 電話を作ろう(v1.6用)Kenji Sakashita
728 vues19 diapositives

Contenu connexe

Tendances

JavaYDL16 par
JavaYDL16JavaYDL16
JavaYDL16Terry Yoast
821 vues41 diapositives
Android app deveopment par
Android app deveopmentAndroid app deveopment
Android app deveopmentKhaderbasha Shaik
1.4K vues67 diapositives
GENERATOR V1.0 (Shenzhen) par
GENERATOR V1.0 (Shenzhen)GENERATOR V1.0 (Shenzhen)
GENERATOR V1.0 (Shenzhen)HAX
2K vues129 diapositives
Android executable modeling: beyond android programming par
Android executable modeling: beyond android programmingAndroid executable modeling: beyond android programming
Android executable modeling: beyond android programmingOlivier Le Goaër
1.3K vues21 diapositives
Top Tips for Android UIs par
Top Tips for Android UIsTop Tips for Android UIs
Top Tips for Android UIsMotorola Mobility - MOTODEV
935 vues67 diapositives
Backend, app e internet das coisas com NodeJS no Google Cloud Platform par
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 PlatformAlvaro Viebrantz
959 vues89 diapositives

Tendances(7)

En vedette

Conférence "Architecture Android" du 19 Mars 2013 par Mathias Seguy fondateur... par
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
5.8K vues71 diapositives
Mise en place de l'ActionBarCompat dans vos projets Android. par
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
2.1K vues20 diapositives
Android un nouveau futur s'ouvre à nous par
Android un nouveau futur s'ouvre à nousAndroid un nouveau futur s'ouvre à nous
Android un nouveau futur s'ouvre à nousMathias Seguy
2.2K vues49 diapositives
CocoaHeads An Android Overview (fr) par
CocoaHeads An Android Overview (fr)CocoaHeads An Android Overview (fr)
CocoaHeads An Android Overview (fr)Mathias Seguy
2K vues24 diapositives
Treatment, Architecture and Threads par
Treatment, Architecture and ThreadsTreatment, Architecture and Threads
Treatment, Architecture and ThreadsMathias Seguy
865 vues81 diapositives
Architecture et Bonnes pratiques Android #DevoxxFr2016 Part2 par
Architecture et Bonnes pratiques Android #DevoxxFr2016 Part2Architecture et Bonnes pratiques Android #DevoxxFr2016 Part2
Architecture et Bonnes pratiques Android #DevoxxFr2016 Part2Mathias Seguy
1.6K vues135 diapositives

En vedette(14)

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

Similaire à Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_slideshare

Profiling Android Applications par
Profiling Android ApplicationsProfiling Android Applications
Profiling Android Applicationshubx
362 vues35 diapositives
An Introduction To Android par
An Introduction To AndroidAn Introduction To Android
An Introduction To Androidnatdefreitas
10.6K vues62 diapositives
Ii 1300-java essentials for android par
Ii 1300-java essentials for androidIi 1300-java essentials for android
Ii 1300-java essentials for androidAdrian Mikeliunas
1.4K vues45 diapositives
Getting started with android dev and test perspective par
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspectiveGunjan Kumar
3.2K vues79 diapositives
Introduction to Android App Development par
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App DevelopmentAndri Yadi
2.5K vues42 diapositives
Improve Android System Component Performance par
Improve Android System Component PerformanceImprove Android System Component Performance
Improve Android System Component PerformanceNational Cheng Kung University
6.3K vues71 diapositives

Similaire à Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_slideshare(20)

Profiling Android Applications par hubx
Profiling Android ApplicationsProfiling Android Applications
Profiling Android Applications
hubx362 vues
An Introduction To Android par natdefreitas
An Introduction To AndroidAn Introduction To Android
An Introduction To Android
natdefreitas10.6K vues
Getting started with android dev and test perspective par Gunjan Kumar
Getting started with android   dev and test perspectiveGetting started with android   dev and test perspective
Getting started with android dev and test perspective
Gunjan Kumar3.2K vues
Introduction to Android App Development par Andri Yadi
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App Development
Andri Yadi2.5K vues
Android ppt par Pooja Garg
Android pptAndroid ppt
Android ppt
Pooja Garg36.8K vues
Android app developers in bangalore- thorsignia par charan Teja
Android app developers in bangalore- thorsigniaAndroid app developers in bangalore- thorsignia
Android app developers in bangalore- thorsignia
charan Teja58 vues
Android Development: The Basics par Mike Desjardins
Android Development: The BasicsAndroid Development: The Basics
Android Development: The Basics
Mike Desjardins19.7K vues
Build Mobile Application In Android par dnnddane
Build Mobile Application In AndroidBuild Mobile Application In Android
Build Mobile Application In Android
dnnddane1.5K vues
"JavaME + Android in action" CCT-CEJUG Dezembro 2008 par Vando Batista
"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 Batista1.3K vues
Google Android @ AlphaCSP's JavaEdge par yuvalb
Google Android @ AlphaCSP's JavaEdgeGoogle Android @ AlphaCSP's JavaEdge
Google Android @ AlphaCSP's JavaEdge
yuvalb1.7K vues
Slides bootcamp21 par dxsaki
Slides bootcamp21Slides bootcamp21
Slides bootcamp21
dxsaki288 vues

Dernier

Business Analyst Series 2023 - Week 3 Session 5 par
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5DianaGray10
345 vues20 diapositives
Igniting Next Level Productivity with AI-Infused Data Integration Workflows par
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Safe Software
317 vues86 diapositives
Uni Systems for Power Platform.pptx par
Uni Systems for Power Platform.pptxUni Systems for Power Platform.pptx
Uni Systems for Power Platform.pptxUni Systems S.M.S.A.
58 vues21 diapositives
Network Source of Truth and Infrastructure as Code revisited par
Network Source of Truth and Infrastructure as Code revisitedNetwork Source of Truth and Infrastructure as Code revisited
Network Source of Truth and Infrastructure as Code revisitedNetwork Automation Forum
32 vues45 diapositives
STPI OctaNE CoE Brochure.pdf par
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdfmadhurjyapb
14 vues1 diapositive
The Research Portal of Catalonia: Growing more (information) & more (services) par
The Research Portal of Catalonia: Growing more (information) & more (services)The Research Portal of Catalonia: Growing more (information) & more (services)
The Research Portal of Catalonia: Growing more (information) & more (services)CSUC - Consorci de Serveis Universitaris de Catalunya
115 vues25 diapositives

Dernier(20)

Business Analyst Series 2023 - Week 3 Session 5 par DianaGray10
Business Analyst Series 2023 -  Week 3 Session 5Business Analyst Series 2023 -  Week 3 Session 5
Business Analyst Series 2023 - Week 3 Session 5
DianaGray10345 vues
Igniting Next Level Productivity with AI-Infused Data Integration Workflows par Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software317 vues
STPI OctaNE CoE Brochure.pdf par madhurjyapb
STPI OctaNE CoE Brochure.pdfSTPI OctaNE CoE Brochure.pdf
STPI OctaNE CoE Brochure.pdf
madhurjyapb14 vues
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors par sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab23 vues
Future of AR - Facebook Presentation par ssuserb54b561
Future of AR - Facebook PresentationFuture of AR - Facebook Presentation
Future of AR - Facebook Presentation
ssuserb54b56122 vues
PharoJS - Zürich Smalltalk Group Meetup November 2023 par Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi139 vues
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f... par TrustArc
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc Webinar - Managing Online Tracking Technology Vendors_ A Checklist f...
TrustArc72 vues
"Running students' code in isolation. The hard way", Yurii Holiuk par Fwdays
"Running students' code in isolation. The hard way", Yurii Holiuk "Running students' code in isolation. The hard way", Yurii Holiuk
"Running students' code in isolation. The hard way", Yurii Holiuk
Fwdays24 vues
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive par Network Automation Forum
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLiveAutomating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Automating a World-Class Technology Conference; Behind the Scenes of CiscoLive
Unit 1_Lecture 2_Physical Design of IoT.pdf par StephenTec
Unit 1_Lecture 2_Physical Design of IoT.pdfUnit 1_Lecture 2_Physical Design of IoT.pdf
Unit 1_Lecture 2_Physical Design of IoT.pdf
StephenTec15 vues
"Surviving highload with Node.js", Andrii Shumada par Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays33 vues

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