SlideShare uma empresa Scribd logo
1 de 49
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

Mais conteúdo relacionado

Mais procurados

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
 
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 PlatformAlvaro Viebrantz
 
Local Notification Tutorial
Local Notification TutorialLocal Notification Tutorial
Local Notification TutorialKetan Raval
 

Mais procurados (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
 

Destaque

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 à nousMathias 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 ThreadsMathias 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 Part2Mathias 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 - DroidconLondon2015Mathias 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 projectsMathias 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 BelgiqueDenis 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 Part1Mathias Seguy
 

Destaque (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
 

Semelhante a Eclispe daytoulouse combining the power of eclipse with android_fr_1024_768_slideshare

Profiling Android Applications
Profiling Android ApplicationsProfiling Android Applications
Profiling Android Applicationshubx
 
An Introduction To Android
An Introduction To AndroidAn Introduction To Android
An Introduction To Androidnatdefreitas
 
Ii 1300-java essentials for android
Ii 1300-java essentials for androidIi 1300-java essentials for android
Ii 1300-java essentials for androidAdrian 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 perspectiveGunjan Kumar
 
Introduction to Android App Development
Introduction to Android App DevelopmentIntroduction to Android App Development
Introduction to Android App DevelopmentAndri Yadi
 
Android app developers in bangalore- thorsignia
Android app developers in bangalore- thorsigniaAndroid app developers in bangalore- thorsignia
Android app developers in bangalore- thorsigniacharan Teja
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to androidzeelpatel0504
 
Android Development: The Basics
Android Development: The BasicsAndroid Development: The Basics
Android Development: The BasicsMike Desjardins
 
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 2008Vando Batista
 
Google Android @ AlphaCSP's JavaEdge
Google Android @ AlphaCSP's JavaEdgeGoogle Android @ AlphaCSP's JavaEdge
Google Android @ AlphaCSP's JavaEdgeyuvalb
 
Slides bootcamp21
Slides bootcamp21Slides bootcamp21
Slides bootcamp21dxsaki
 
OS in mobile devices [Android]
OS in mobile devices [Android]OS in mobile devices [Android]
OS in mobile devices [Android]Yatharth Aggarwal
 

Semelhante a 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]
 

Último

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 

Último (20)

Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 

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