There are so many tools and tricks for developing Android apps, but which ones actually help when you're building apps day in and day out? Luke Wallace introduces the critical development tools you need and demonstrates how to use them to build real apps. Learn about the six critical tools every developer must have, find out about the key techniques that will help you build masterful Android apps, and discover at least one weird trick to speed up your app development. Luke unearths third party libraries that you may not know about and shows you a simple, powerful guide to continuous integration. Discover new ways to connect with other Android developers in the industry and join this growing community. Explore the future of Android Studio and Eclipse and new tools coming from Google that will make your apps faster, more reliable, more beautiful, and easier to maintain.
1.
W4
Session
4/15/2015
11:00
AM
"Mastering Android
Development Tools"
Presented by:
Luke Wallace
Bottle Rocket
Brought
to
you
by:
340
Corporate
Way,
Suite
300,
Orange
Park,
FL
32073
888-‐268-‐8770
·∙
904-‐278-‐0524
·∙
sqeinfo@sqe.com
·∙
www.sqe.com
2. Luke Wallace
Bottle Rocket
Luke Wallace leads all Android development at Bottle Rocket. Luke wrote
several of the first Android apps for Bottle Rocket and continues to oversee every
project to maintain quality and push the bounds of what’s possible. A strong
proponent of the Android platform, he is an invaluable resource for getting the
Android perspective on news and trends within the industry. With his technical
knowledge and humor, Luke loves educating people about Android.
7. 4/8/15
5
Git branches - git flow
origin/develop
(progress builds)
origin/release/1.0
origin/release/1.1
[origin/]feature/x
Writing Code - Eclipse
• Traditional method of Android development
• Windows, Mac, and Linux support
• Lots of existing support
• XML layout support is okay, better than v1.0
• Old and Busted now
• No further development
• Dev site says to stop using it now!
8. 4/8/15
6
Writing Code - Android Studio
• New Standard
- reached 1.0 late 2014
• Still in heavy development
• Migration is getting easier
• We’re using it on new
projects, and migrating
old projects too it as time
permits.
Checking Code - Lint
• Command Line tool
• Part of Android Developer Tools
• Lots of support from the Android team
• Our rule: No Warnings!
9. 4/8/15
7
Custom Lint Rules
• Little Documentation
• Lots of setup (for the first one)
• Few examples (beyond the built in ones)
• android.googlesource.com/platform/sdk/
[build]/lint/libs/lint_checks/src/
• Codify your internal rules
• Tip: 3-line Custom Manifest
Libraries
• Android Support Library
• ViewPager
• DrawerLayout
• ActionBarSherlock ActionBarCompat
• Square Libraries (OkHttp, Picasso, etc.)
• Ion, Volley, etc.
• Home Grown (BRShared)
10. 4/8/15
8
Analyze
• Charles
• HTTP proxy - analyze requests & responses
• supports HTTPS with some additional effort
Analyze
• Hierarchy Viewer
11. 4/8/15
9
One Weird Trick!
Add ViewServer to use Hierarchy Viewer on real
devices!
Continuous Integration
• Jenkins
• Every 15 minutes (random per project)
• Check for new code
• Build (using Ant or gradle)
• DO IT!
12. 4/8/15
10
Jenkins - Multiple Builds
• Debug
• Release
• Staging Servers
• Free
• Paid
• Amazon Appstore
• Google Play
Jenkins - Multiple Builds
• use your build.xml to change config URL or
other parameters at build time.
<property environment="env"/>
<target name="preprocess-build-number" if="env.BUILD_NUMBER">
<echo>Setting build number: ${env.BUILD_NUMBER}</echo>
<replaceregexp
file="res/values/build_config.xml"
match="build_number">.*?<"
replace="build_number">${env.BUILD_NUMBER}<"
/>
</target>
13. 4/8/15
11
Jenkins - Multiple Builds
• use your build.xml to change config URL or
other parameters at build time.
<target name="preprocess-release" if="build.target.release">
<echo>Configuring build_config.xml for a release build</echo>
<replaceregexp
file="res/values/build_config.xml"
match="version_name">.*?<"
replace="version_name">@string/version_name_production<"
/>
</target>
Jenkins - Multiple Builds
• Gradle build system makes this easier
15. 4/8/15
13
Real Devices
Automatic Crash Collection
ACRA - Application Crash Reporting for Android
• http://acra.ch
• Sends crashes to Google Docs
• Can send reports directly to your backend, or
several hosted options.
16. 4/8/15
14
Emulators
• Google Provided Emulator
• x86
• Genymotion - $$$ for commercial use
Google Play Dev Portal
Alpha - Beta - Production %
Get Optimization Tips
Analyze common devices
Respond to Reviews