SlideShare a Scribd company logo
Things I wish I knew



         Hard Earned Android Programming Experiences



Kashif
Directi
•   We do exciting work
    •   Mobile
    •   Desktop
    •   Server
    •   Internet scale

•   We have a fun CEO
•   We even have stall




                          Join Directi
Talk.to
    Communication software
    ●   Android, iPhone, BB
    ●   Desktop, Web
    ●   In person


●   All services
    ●   FB, Gmail, Yahoo, MSN, etc...


●   All channels
    ●   SMS
    ●   VOIP
    ●   Video
    ●   Chat
Use Native




1
Use Native
●
    Webstuff and HTML5 sucks for mobile dev
    ●
        Not complete
    ●
        Not performant
    ●
        Lots of corner cases
    ●
        Typically poor code quality
    ●
        http://slidesha.re/g68sCY
Debugging ++




 2
Debugging ++
●   Use DDMS
    ●   Memory Leaks
    ●   Thread Leaks
    ●   Dominator Graph – MAT not JHat
    ●   TraceView startMethodTracing – 8 MB limit


●   Application Crash Report for Android (ACRA)
    ●   http://code.google.com/p/acra/
    ●   Send yourself a crash report – automatically
    ●   Easy, awesome, indispensible


●   Debug Logs – ACRA or logcat
Always remember Memory




      3
Always remember Memory
●
    Don't cache too much
●
    Statics can screw with memory
●
    Soft References
●
    Garbage Collection (tool for analyzing rate)
●
    Reuse – unlike OOP Compilers
●
    Release on LowMemory you may not die
Services get collected




     4
Services get collected

●
    You don't need a service
●
    Android kills you
●
    Users kill you
●
    Use C2DM and AlarmManager
Focus on the right devices




       5
Focus on the right devices
●
    Foolish feedback loop
●
    Low End Devices
●
    All screen sizes
    ●
        Relative Layouts

●
    You don't have to support everything
Everything is customizable




       6
Everything is customizable
●   ListItems,
●   Tabs,
●   Buttons,
●   Title Bars,
●   Edit Text,
●   Dropdowns,
●   Keyboards,
●   Checkbox,
●   DialogBox,
●   Radiobuttons,
●   Life...
The database is slow




    7
The database is slow
●
    Batch Reads
    ●
        Don't read single values

●
    Batch Writes
    ●
        not really – but single compile
    ●
        DatabaseUtils.InsertHelper

●
    UI Interaction underway – defer DB
●
    Worry about schema migration
Networking eats battery




      8
Networking eats battery
●
    Raj VijayKumar at Qualcomm
    ●
        Android radio set to dormant after 10 seconds

●
    Multiplex sockets
●
    Prefer native TCP
●
    Use Push
Monitoring etc...




   9
Monitoring etc...
●
    We used Google Analytics and that sucked

●
    Flurry is cool
    ●
        SDK
    ●
        Other demographic data
    ●
        Events
    ●
        Customized for mobile at all levels

●
    MonkeyRunner
Questions?




    kashifrazzaqui

@   kashif.ra@directi.com

More Related Content

PPTX
Full stack development
PDF
KEY
Final Project Alpha presentation
PPTX
“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...
PPTX
How to bring the next 4-5 billion Online?
PDF
Many ways to Android Development - a rant!
PPTX
Innovation Jockeys 3 - Gramseva: Kisan
PPSX
Amizoner Presentation
Full stack development
Final Project Alpha presentation
“Micro Frontends”- You Keep Using That Word, I Don’t Think It Means What You ...
How to bring the next 4-5 billion Online?
Many ways to Android Development - a rant!
Innovation Jockeys 3 - Gramseva: Kisan
Amizoner Presentation

Similar to Droid con (20)

ODP
Apache Cordova, Hybrid Application Development
PDF
All Aboard The Stateful Train
PDF
Tooling Matters - Development tools
PPTX
The Professional Programmer
PDF
Really fast Android
PDF
Android Tamer (Anant Shrivastava)
PDF
IT Career Planning v2
PDF
Debugging Web Apps on Real Mobile Devices
ODP
Path Dependent Development (PyCon AU)
PDF
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
PDF
Full stack development
PDF
Leveraging Android's Linux Heritage
PDF
Leveraging Android's Linux Heritage at ELC-E 2011
PDF
OSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
PPTX
Computer Programming Overview
PDF
Embedded Android Workshop / ELC 2013
PDF
Embedded Android Workshop at AnDevCon IV
PDF
Embedded Android Workshop at ELC Europe
PDF
Android Jumpstart ESC SV 2012 Part I
PDF
Embedded Android Workshop at AnDevCon V
Apache Cordova, Hybrid Application Development
All Aboard The Stateful Train
Tooling Matters - Development tools
The Professional Programmer
Really fast Android
Android Tamer (Anant Shrivastava)
IT Career Planning v2
Debugging Web Apps on Real Mobile Devices
Path Dependent Development (PyCon AU)
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
Full stack development
Leveraging Android's Linux Heritage
Leveraging Android's Linux Heritage at ELC-E 2011
OSMC 2014: Naemon 1, 2, 3, N | Andreas Ericsson
Computer Programming Overview
Embedded Android Workshop / ELC 2013
Embedded Android Workshop at AnDevCon IV
Embedded Android Workshop at ELC Europe
Android Jumpstart ESC SV 2012 Part I
Embedded Android Workshop at AnDevCon V
Ad

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Heart disease approach using modified random forest and particle swarm optimi...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
Tartificialntelligence_presentation.pptx
PDF
Empathic Computing: Creating Shared Understanding
PPTX
1. Introduction to Computer Programming.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Approach and Philosophy of On baking technology
PDF
August Patch Tuesday
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
Encapsulation theory and applications.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Network Security Unit 5.pdf for BCA BBA.
OMC Textile Division Presentation 2021.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
NewMind AI Weekly Chronicles - August'25-Week II
Heart disease approach using modified random forest and particle swarm optimi...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Tartificialntelligence_presentation.pptx
Empathic Computing: Creating Shared Understanding
1. Introduction to Computer Programming.pptx
Spectral efficient network and resource selection model in 5G networks
Per capita expenditure prediction using model stacking based on satellite ima...
Approach and Philosophy of On baking technology
August Patch Tuesday
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Ad

Droid con

  • 1. Things I wish I knew Hard Earned Android Programming Experiences Kashif
  • 2. Directi • We do exciting work • Mobile • Desktop • Server • Internet scale • We have a fun CEO • We even have stall Join Directi
  • 3. Talk.to Communication software ● Android, iPhone, BB ● Desktop, Web ● In person ● All services ● FB, Gmail, Yahoo, MSN, etc... ● All channels ● SMS ● VOIP ● Video ● Chat
  • 5. Use Native ● Webstuff and HTML5 sucks for mobile dev ● Not complete ● Not performant ● Lots of corner cases ● Typically poor code quality ● http://slidesha.re/g68sCY
  • 7. Debugging ++ ● Use DDMS ● Memory Leaks ● Thread Leaks ● Dominator Graph – MAT not JHat ● TraceView startMethodTracing – 8 MB limit ● Application Crash Report for Android (ACRA) ● http://code.google.com/p/acra/ ● Send yourself a crash report – automatically ● Easy, awesome, indispensible ● Debug Logs – ACRA or logcat
  • 9. Always remember Memory ● Don't cache too much ● Statics can screw with memory ● Soft References ● Garbage Collection (tool for analyzing rate) ● Reuse – unlike OOP Compilers ● Release on LowMemory you may not die
  • 11. Services get collected ● You don't need a service ● Android kills you ● Users kill you ● Use C2DM and AlarmManager
  • 12. Focus on the right devices 5
  • 13. Focus on the right devices ● Foolish feedback loop ● Low End Devices ● All screen sizes ● Relative Layouts ● You don't have to support everything
  • 15. Everything is customizable ● ListItems, ● Tabs, ● Buttons, ● Title Bars, ● Edit Text, ● Dropdowns, ● Keyboards, ● Checkbox, ● DialogBox, ● Radiobuttons, ● Life...
  • 16. The database is slow 7
  • 17. The database is slow ● Batch Reads ● Don't read single values ● Batch Writes ● not really – but single compile ● DatabaseUtils.InsertHelper ● UI Interaction underway – defer DB ● Worry about schema migration
  • 19. Networking eats battery ● Raj VijayKumar at Qualcomm ● Android radio set to dormant after 10 seconds ● Multiplex sockets ● Prefer native TCP ● Use Push
  • 21. Monitoring etc... ● We used Google Analytics and that sucked ● Flurry is cool ● SDK ● Other demographic data ● Events ● Customized for mobile at all levels ● MonkeyRunner
  • 22. Questions? kashifrazzaqui @ kashif.ra@directi.com