SlideShare una empresa de Scribd logo
1 de 12
Descargar para leer sin conexión
All rights reserved. 2015 © ZeroTurnaround Inc.
THE OS THAT POWERS 10^10 DEVICES
AND A SOFTWARE DEVELOPMENT PLATFORM!
ANDROID: THE PLATFORM,
THE FRAMEWORK, AND THE
WAY OF LIFE
As long as you’re close
to a power outlet
All rights reserved. 2015 © ZeroTurnaround Inc.
PREFACE
PART 1: THE ANDROID ECOSYSTEM
	 Where do we begin?
PART 2 : APPLICATION DESIGN AND ARCHITECTURE	
	 Proper Code Patterns
	 Parallelization model
PART 3: PROPER INFRASTRUCTURE
	 Testing Android Applications
	 Proper Tooling for Android Development
	 Static Code Analysis Tools
SUMMARY: FINAL WORDS & COMIC
TABLE OF CONTENTS
Live Android Development
REPORT SPONSORED BY:
1
4
5
13
14
28
33
34
38
47
51
All rights reserved. 2015 © ZeroTurnaround Inc.
Deciding which versions you need to support is of course an important
business decision. Every device you decide not to support is a potential
revenue loss for your business. More importantly, baking in the
compatibility with older devices at a later time takes much more work than
supporting them from day one. This convenient Google dashboard shows
that around 60% of devices run Android 4.4 or newer. These are all
fairly recent versions that have support for the ART runtime and a
number of other important features.
You can find the supported functionality changelog over at
android.developer.com. This will help you decide if you want to target
the early adopters or the slower updating masses.
The next thing to think about is what kind of devices you want to target.
The range of big-kid-toys that support Android is growing every month:
phones, tablets, watches, cars, TV, toys, even fridges. Soon anything with
a microchip will feature some sort of Android support, maybe even you!
While supporting the latest trends in hardware can make your application
look hip, it requires heavy lifting on the development side.
For example, you need to approach the app design differently. The UX (user
experience) will drive the UI (user interface) which in turn will drive the
code and the architecture for your project. You will have to test your code
on additional platforms, exploding the test-matrices and your continuous
integration environments. You truly need to consider whether you need this
complexity in your project — before you start writing your code.
All rights reserved. 2015 © ZeroTurnaround Inc.
The Activity or Fragment sends Actions to the central Dispatcher. This will in turn redirect the Action to the right Store
and process it (Stores are in charge of keeping the state of a given domain concept). In some cases, this might trigger
other Actions in the shape of changes — that will cause the View to get updated.
All rights reserved. 2015 © ZeroTurnaround Inc.
Application Activity Service Contentprovider BroadcastReceiver
Show a Dialog
Start an Activity
Layout Inflation
Start a Service
Bind to a Service
Send a Broadcast
Register BroadcastReceiver
Load Resource Values
1 1
2 2
1
2
1
2
3
While we are talking about references to activities, let’s take a look at contexts.
Did you leave room for a final tattoo? If you did, this is a great candidate to fill that spot,
from a Contexts blog post by Dave Smith:
1. 	 An application CAN start an Activity from here, but it requires that a new task be created. This may fit specific use cases, but can create non-standard back stack 				
	 behaviors in your application and is generally not recommended or considered good practice.
2. 	 This is legal, but inflation will be done with the default theme for the system on which you are running, not what’s defined in your application.
3. 	 Allowed if the receiver is null, which is used for obtaining the current value of a sticky broadcast, on Android 4.2 and above.
All rights reserved. 2015 © ZeroTurnaround Inc.
The build tool is pretty much the most used tool for any project
on any platform, perhaps closely following the IDE. Without it,
your code is just a bunch of files wondering how they can make a
difference. I am sure you have used Maven before and you clearly
realize the importance of a high quality build tool for your project.
You also realize that your project should use state-of-the-art tools
available on the market, as long as they provide value to you.
All rights reserved. 2015 © ZeroTurnaround Inc.
Another magnificent productivity enhancement that you should
try is JRebel for Android. Yep, this one has been developed by the
super-human brains at ZeroTurnaround!
All rights reserved. 2015 © ZeroTurnaround Inc.
Genymotion emulator
Another way to speed up your development process is to change
the target runtime of your application. Most Android developers
run their application on real, physical devices rather than using an
emulator. This is done because the emulator can be intolerably
slow. While it is slower than usual runtime, the real pain comes
from the startup time — which is as slow as an asthmatic sloth.
All rights reserved. 2015 © ZeroTurnaround Inc.
Android Studio is based on the Intellij IDEA Community edition,
the fully open source IDE that powers the famous Intellij IDEA
Ultimate Edition IDE by JetBrains.
The IDE is your command center, your fighter jet cockpit, your
ninja training facility. You get it, it is important. Hopefully you are
using Android Studio already. If you have a Java background and
used Eclipse rather than IDEA you might find the migration to
Android Studio problematic.
However, we have published a great report on migrating from
Eclipse to Intellij IDEA, which highlights the concepts that IDEA
and Android Studio use. The report helps you to navigate the
important menus, preferences, plugins and so on.
IDEs like any software tend to improve and get better, faster, and
more intelligent. So keep updating yours, learn the shortcuts and
productivity tips, stay alert for the new cool plugins that might
simplify your life.
All rights reserved. 2015 © ZeroTurnaround Inc.
The Android Lint team describe their tool on their website as “a static code
analysis tool that checks your Android project source files for potential bugs
and optimization improvements for correctness, security, performance,
usability, accessibility, and internationalization.”
Android Lint is a default package in the Android SDK. This means that you
do not have to install any additional components to your workstation to
make use of it.
Lint is configured with a small XML file, allowing you to customize
parameters like the severity levels for each type of the problem and
much more.
To run the Lint checks on the project, navigate to the project home directory
and run the lint command. This will find issues in many different aspects of
code quality, including correctness, usability, performance, accessibility and
obsolete dependencies.
Android Lint
All rights reserved. 2015 © ZeroTurnaround Inc.
EARLY ACCESS FREE 21 DAY TRIAL DOWNLOAD NOW!
All rights reserved. 2015 © ZeroTurnaround Inc.
Report Authors:
Isra Boza Rodriguez (@IsraKaos), Oleg Shelajev (@shelajev)
Report Contributors:
Simon Maple (@sjmaple), Mart Redi (@martredi)​
Report Designer: Ladislava Bohacova​(@ladislava)
Contact us
Estonia
Ülikooli 2, 4th floor
Tartu, Estonia, 51003
Phone: +372 653 6099
Twitter: @RebelLabs
Web: http://zeroturnaround.com/rebellabs
Email: labs@zeroturnaround.com
USA
399 Boylston Street,
Suite 300, Boston,
MA, USA, 02116
Phone: 1 (857) 277-1199
Czech Republic
Jankovcova 1037/49
Building C, 5th floor,
170 00 Prague 7, Czech Republic
Phone: +420 227 020 130

Más contenido relacionado

Más de ZeroTurnaround

Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
ZeroTurnaround
 
Language Design Tradeoffs - Kotlin and Beyond, by Andrey Breslav
Language Design Tradeoffs - Kotlin and Beyond, by Andrey BreslavLanguage Design Tradeoffs - Kotlin and Beyond, by Andrey Breslav
Language Design Tradeoffs - Kotlin and Beyond, by Andrey Breslav
ZeroTurnaround
 
Runtime Innovation - Nextgen Ninja Hacking of the JVM, by Ryan Sciampacone
Runtime Innovation - Nextgen Ninja Hacking of the JVM, by Ryan SciampaconeRuntime Innovation - Nextgen Ninja Hacking of the JVM, by Ryan Sciampacone
Runtime Innovation - Nextgen Ninja Hacking of the JVM, by Ryan Sciampacone
ZeroTurnaround
 
Easy Scaling with Open Source Data Structures, by Talip Ozturk
Easy Scaling with Open Source Data Structures, by Talip OzturkEasy Scaling with Open Source Data Structures, by Talip Ozturk
Easy Scaling with Open Source Data Structures, by Talip Ozturk
ZeroTurnaround
 
Blast your app with Gatling! by Stephane Landelle
Blast your app with Gatling! by Stephane LandelleBlast your app with Gatling! by Stephane Landelle
Blast your app with Gatling! by Stephane Landelle
ZeroTurnaround
 
JVM JIT compilation overview by Vladimir Ivanov
JVM JIT compilation overview by Vladimir IvanovJVM JIT compilation overview by Vladimir Ivanov
JVM JIT compilation overview by Vladimir Ivanov
ZeroTurnaround
 
How To Do Kick-Ass Software Development, by Sven Peters
How To Do Kick-Ass Software Development, by Sven PetersHow To Do Kick-Ass Software Development, by Sven Peters
How To Do Kick-Ass Software Development, by Sven Peters
ZeroTurnaround
 
Level Up Your Git and GitHub Experience by Jordan McCullough and Brent Beer
Level Up Your Git and GitHub Experience by Jordan McCullough and Brent BeerLevel Up Your Git and GitHub Experience by Jordan McCullough and Brent Beer
Level Up Your Git and GitHub Experience by Jordan McCullough and Brent Beer
ZeroTurnaround
 
AST Transformations: Groovy’s best kept secret by Andres Almiray
AST Transformations: Groovy’s best kept secret by Andres AlmirayAST Transformations: Groovy’s best kept secret by Andres Almiray
AST Transformations: Groovy’s best kept secret by Andres Almiray
ZeroTurnaround
 
Tap into the power of slaves with Jenkins by Kohsuke Kawaguchi
Tap into the power of slaves with Jenkins by Kohsuke KawaguchiTap into the power of slaves with Jenkins by Kohsuke Kawaguchi
Tap into the power of slaves with Jenkins by Kohsuke Kawaguchi
ZeroTurnaround
 
Language Design Tradeoffs (Kotlin and Beyond) by Andrey Breslav
Language Design Tradeoffs (Kotlin and Beyond) by Andrey BreslavLanguage Design Tradeoffs (Kotlin and Beyond) by Andrey Breslav
Language Design Tradeoffs (Kotlin and Beyond) by Andrey Breslav
ZeroTurnaround
 
Spring 4 on Java 8 by Juergen Hoeller
Spring 4 on Java 8 by Juergen HoellerSpring 4 on Java 8 by Juergen Hoeller
Spring 4 on Java 8 by Juergen Hoeller
ZeroTurnaround
 

Más de ZeroTurnaround (20)

Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
Top Java IDE keyboard shortcuts for Eclipse, IntelliJIDEA, NetBeans (report p...
 
Java Tools and Technologies Landscape for 2014 (image gallery)
Java Tools and Technologies Landscape for 2014 (image gallery)Java Tools and Technologies Landscape for 2014 (image gallery)
Java Tools and Technologies Landscape for 2014 (image gallery)
 
Getting Started with IntelliJ IDEA as an Eclipse User
Getting Started with IntelliJ IDEA as an Eclipse UserGetting Started with IntelliJ IDEA as an Eclipse User
Getting Started with IntelliJ IDEA as an Eclipse User
 
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...
[Image Results] Java Build Tools: Part 2 - A Decision Maker's Guide Compariso...
 
DevOps vs Traditional IT Ops (DevOps Days ignite talk by Oliver White)
DevOps vs Traditional IT Ops (DevOps Days ignite talk by Oliver White)DevOps vs Traditional IT Ops (DevOps Days ignite talk by Oliver White)
DevOps vs Traditional IT Ops (DevOps Days ignite talk by Oliver White)
 
Lazy Coder's Visual Guide to RebelLabs' Developer Productivity Report 2013
Lazy Coder's Visual Guide to RebelLabs' Developer Productivity Report 2013Lazy Coder's Visual Guide to RebelLabs' Developer Productivity Report 2013
Lazy Coder's Visual Guide to RebelLabs' Developer Productivity Report 2013
 
The State of Managed Runtimes 2013, by Attila Szegedi
The State of Managed Runtimes 2013, by Attila SzegediThe State of Managed Runtimes 2013, by Attila Szegedi
The State of Managed Runtimes 2013, by Attila Szegedi
 
Language Design Tradeoffs - Kotlin and Beyond, by Andrey Breslav
Language Design Tradeoffs - Kotlin and Beyond, by Andrey BreslavLanguage Design Tradeoffs - Kotlin and Beyond, by Andrey Breslav
Language Design Tradeoffs - Kotlin and Beyond, by Andrey Breslav
 
Runtime Innovation - Nextgen Ninja Hacking of the JVM, by Ryan Sciampacone
Runtime Innovation - Nextgen Ninja Hacking of the JVM, by Ryan SciampaconeRuntime Innovation - Nextgen Ninja Hacking of the JVM, by Ryan Sciampacone
Runtime Innovation - Nextgen Ninja Hacking of the JVM, by Ryan Sciampacone
 
Easy Scaling with Open Source Data Structures, by Talip Ozturk
Easy Scaling with Open Source Data Structures, by Talip OzturkEasy Scaling with Open Source Data Structures, by Talip Ozturk
Easy Scaling with Open Source Data Structures, by Talip Ozturk
 
Blast your app with Gatling! by Stephane Landelle
Blast your app with Gatling! by Stephane LandelleBlast your app with Gatling! by Stephane Landelle
Blast your app with Gatling! by Stephane Landelle
 
JVM JIT compilation overview by Vladimir Ivanov
JVM JIT compilation overview by Vladimir IvanovJVM JIT compilation overview by Vladimir Ivanov
JVM JIT compilation overview by Vladimir Ivanov
 
How To Do Kick-Ass Software Development, by Sven Peters
How To Do Kick-Ass Software Development, by Sven PetersHow To Do Kick-Ass Software Development, by Sven Peters
How To Do Kick-Ass Software Development, by Sven Peters
 
Level Up Your Git and GitHub Experience by Jordan McCullough and Brent Beer
Level Up Your Git and GitHub Experience by Jordan McCullough and Brent BeerLevel Up Your Git and GitHub Experience by Jordan McCullough and Brent Beer
Level Up Your Git and GitHub Experience by Jordan McCullough and Brent Beer
 
AST Transformations: Groovy’s best kept secret by Andres Almiray
AST Transformations: Groovy’s best kept secret by Andres AlmirayAST Transformations: Groovy’s best kept secret by Andres Almiray
AST Transformations: Groovy’s best kept secret by Andres Almiray
 
Tap into the power of slaves with Jenkins by Kohsuke Kawaguchi
Tap into the power of slaves with Jenkins by Kohsuke KawaguchiTap into the power of slaves with Jenkins by Kohsuke Kawaguchi
Tap into the power of slaves with Jenkins by Kohsuke Kawaguchi
 
Language Design Tradeoffs (Kotlin and Beyond) by Andrey Breslav
Language Design Tradeoffs (Kotlin and Beyond) by Andrey BreslavLanguage Design Tradeoffs (Kotlin and Beyond) by Andrey Breslav
Language Design Tradeoffs (Kotlin and Beyond) by Andrey Breslav
 
Spring 4 on Java 8 by Juergen Hoeller
Spring 4 on Java 8 by Juergen HoellerSpring 4 on Java 8 by Juergen Hoeller
Spring 4 on Java 8 by Juergen Hoeller
 
On Inherent Complexity of Computation, by Attila Szegedi
On Inherent Complexity of Computation, by Attila SzegediOn Inherent Complexity of Computation, by Attila Szegedi
On Inherent Complexity of Computation, by Attila Szegedi
 
Programmers Are Way Cooler Than Musicians, by Geert Bevin
Programmers Are Way Cooler Than Musicians, by Geert BevinProgrammers Are Way Cooler Than Musicians, by Geert Bevin
Programmers Are Way Cooler Than Musicians, by Geert Bevin
 

Último

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 

Último (20)

%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 

RebelLabs Android Report 2015: the platform, the best development practices, the tooling

  • 1. All rights reserved. 2015 © ZeroTurnaround Inc. THE OS THAT POWERS 10^10 DEVICES AND A SOFTWARE DEVELOPMENT PLATFORM! ANDROID: THE PLATFORM, THE FRAMEWORK, AND THE WAY OF LIFE As long as you’re close to a power outlet
  • 2. All rights reserved. 2015 © ZeroTurnaround Inc. PREFACE PART 1: THE ANDROID ECOSYSTEM Where do we begin? PART 2 : APPLICATION DESIGN AND ARCHITECTURE Proper Code Patterns Parallelization model PART 3: PROPER INFRASTRUCTURE Testing Android Applications Proper Tooling for Android Development Static Code Analysis Tools SUMMARY: FINAL WORDS & COMIC TABLE OF CONTENTS Live Android Development REPORT SPONSORED BY: 1 4 5 13 14 28 33 34 38 47 51
  • 3. All rights reserved. 2015 © ZeroTurnaround Inc. Deciding which versions you need to support is of course an important business decision. Every device you decide not to support is a potential revenue loss for your business. More importantly, baking in the compatibility with older devices at a later time takes much more work than supporting them from day one. This convenient Google dashboard shows that around 60% of devices run Android 4.4 or newer. These are all fairly recent versions that have support for the ART runtime and a number of other important features. You can find the supported functionality changelog over at android.developer.com. This will help you decide if you want to target the early adopters or the slower updating masses. The next thing to think about is what kind of devices you want to target. The range of big-kid-toys that support Android is growing every month: phones, tablets, watches, cars, TV, toys, even fridges. Soon anything with a microchip will feature some sort of Android support, maybe even you! While supporting the latest trends in hardware can make your application look hip, it requires heavy lifting on the development side. For example, you need to approach the app design differently. The UX (user experience) will drive the UI (user interface) which in turn will drive the code and the architecture for your project. You will have to test your code on additional platforms, exploding the test-matrices and your continuous integration environments. You truly need to consider whether you need this complexity in your project — before you start writing your code.
  • 4. All rights reserved. 2015 © ZeroTurnaround Inc. The Activity or Fragment sends Actions to the central Dispatcher. This will in turn redirect the Action to the right Store and process it (Stores are in charge of keeping the state of a given domain concept). In some cases, this might trigger other Actions in the shape of changes — that will cause the View to get updated.
  • 5. All rights reserved. 2015 © ZeroTurnaround Inc. Application Activity Service Contentprovider BroadcastReceiver Show a Dialog Start an Activity Layout Inflation Start a Service Bind to a Service Send a Broadcast Register BroadcastReceiver Load Resource Values 1 1 2 2 1 2 1 2 3 While we are talking about references to activities, let’s take a look at contexts. Did you leave room for a final tattoo? If you did, this is a great candidate to fill that spot, from a Contexts blog post by Dave Smith: 1. An application CAN start an Activity from here, but it requires that a new task be created. This may fit specific use cases, but can create non-standard back stack behaviors in your application and is generally not recommended or considered good practice. 2. This is legal, but inflation will be done with the default theme for the system on which you are running, not what’s defined in your application. 3. Allowed if the receiver is null, which is used for obtaining the current value of a sticky broadcast, on Android 4.2 and above.
  • 6. All rights reserved. 2015 © ZeroTurnaround Inc. The build tool is pretty much the most used tool for any project on any platform, perhaps closely following the IDE. Without it, your code is just a bunch of files wondering how they can make a difference. I am sure you have used Maven before and you clearly realize the importance of a high quality build tool for your project. You also realize that your project should use state-of-the-art tools available on the market, as long as they provide value to you.
  • 7. All rights reserved. 2015 © ZeroTurnaround Inc. Another magnificent productivity enhancement that you should try is JRebel for Android. Yep, this one has been developed by the super-human brains at ZeroTurnaround!
  • 8. All rights reserved. 2015 © ZeroTurnaround Inc. Genymotion emulator Another way to speed up your development process is to change the target runtime of your application. Most Android developers run their application on real, physical devices rather than using an emulator. This is done because the emulator can be intolerably slow. While it is slower than usual runtime, the real pain comes from the startup time — which is as slow as an asthmatic sloth.
  • 9. All rights reserved. 2015 © ZeroTurnaround Inc. Android Studio is based on the Intellij IDEA Community edition, the fully open source IDE that powers the famous Intellij IDEA Ultimate Edition IDE by JetBrains. The IDE is your command center, your fighter jet cockpit, your ninja training facility. You get it, it is important. Hopefully you are using Android Studio already. If you have a Java background and used Eclipse rather than IDEA you might find the migration to Android Studio problematic. However, we have published a great report on migrating from Eclipse to Intellij IDEA, which highlights the concepts that IDEA and Android Studio use. The report helps you to navigate the important menus, preferences, plugins and so on. IDEs like any software tend to improve and get better, faster, and more intelligent. So keep updating yours, learn the shortcuts and productivity tips, stay alert for the new cool plugins that might simplify your life.
  • 10. All rights reserved. 2015 © ZeroTurnaround Inc. The Android Lint team describe their tool on their website as “a static code analysis tool that checks your Android project source files for potential bugs and optimization improvements for correctness, security, performance, usability, accessibility, and internationalization.” Android Lint is a default package in the Android SDK. This means that you do not have to install any additional components to your workstation to make use of it. Lint is configured with a small XML file, allowing you to customize parameters like the severity levels for each type of the problem and much more. To run the Lint checks on the project, navigate to the project home directory and run the lint command. This will find issues in many different aspects of code quality, including correctness, usability, performance, accessibility and obsolete dependencies. Android Lint
  • 11. All rights reserved. 2015 © ZeroTurnaround Inc. EARLY ACCESS FREE 21 DAY TRIAL DOWNLOAD NOW!
  • 12. All rights reserved. 2015 © ZeroTurnaround Inc. Report Authors: Isra Boza Rodriguez (@IsraKaos), Oleg Shelajev (@shelajev) Report Contributors: Simon Maple (@sjmaple), Mart Redi (@martredi)​ Report Designer: Ladislava Bohacova​(@ladislava) Contact us Estonia Ülikooli 2, 4th floor Tartu, Estonia, 51003 Phone: +372 653 6099 Twitter: @RebelLabs Web: http://zeroturnaround.com/rebellabs Email: labs@zeroturnaround.com USA 399 Boylston Street, Suite 300, Boston, MA, USA, 02116 Phone: 1 (857) 277-1199 Czech Republic Jankovcova 1037/49 Building C, 5th floor, 170 00 Prague 7, Czech Republic Phone: +420 227 020 130