Mastering Android Application Development
eBook - ePub

Mastering Android Application Development

  1. 298 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Mastering Android Application Development

Book details
Book preview
Table of contents
Citations

About This Book

Learn how to do more with the Android SDK with this advanced Android Application guide which shows you how to make even better Android apps that users will love

About This Book

  • Learn how to design and build better Android apps to reach new users
  • Explore the latest features and tools in the Android SDK that will help you become a better developer
  • From concurrency to testing – through to adding adverts and billing, this book ties together every element to help you deliver a high-quality Android application on Google Play

Who This Book Is For

Mastering Android Application Development is intended for Android developers that want insight on and guidance through the steps they need to take to give their creations the edge in a competitive market.

What You Will Learn

  • Create an Android project with Android M features
  • Design the basic navigation for our app using the UI components
  • Set up a cloud-based platform and store data on it
  • Implement programming patterns such as Singleton and Observer to maintain your project code for future use
  • Display lists and grids using Android RecyclerView
  • Implement user interface components and make your app look professional
  • Handle, download, and store images along with memory management
  • Create the database and content providers to perform read-write operations
  • Add notifications to the app and analytics to track the user's usage
  • Show a Google map view on your app
  • Configure minify to obfuscate the code
  • Add adverts and create products for purchase in your app

In Detail

There are millions of Android apps out there for people to download – how do you make sure yours has the edge? It's not always about innovation and ideas – the most successful apps are those that are able to satisfy customer demands – they're the ones that look the best, the fastest, and the easiest and most intuitive to use.

This book shows you how to create Android applications that do precisely that – it has been designed help you consider and answer those questions throughout the development process, so you can create applications that stand out against the crowd. Learn how to create exemplary UIs that contribute to a satisfying user experience through the lens of Material Design, and explore how to harness the range of features within the Android SDK to help you. Dive deeper into complex programming concepts and discover how to leverage concurrency and navigate memory management and image handling. You'll also find further guidance on testing and debugging so you can guarantee that your application is reliable and robust for users.

Beyond this you'll find out how to extend your app and add greater functionality, including notifications, location services, adverts and app billing (essential if you want to properly monetize your creation!). To make sure you have confidence at every stage in the process, the book also shows you how to release your app to the Play store – to make sure your maximising your efforts to create a popular Android application!

Style and approach

This is a step-by-step guide where theory and practice are merged in a way that helps you to put a new concept into practice with ease. By helping to focus on the end result, and showing all the technical steps you need to get there, you will be poised for development success!

Frequently asked questions

Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes, you can access Mastering Android Application Development by Antonio Pachon Ruiz in PDF and/or ePUB format, as well as other popular books in Computer Science & Application Development. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781785884221
Edition
1

Mastering Android Application Development


Table of Contents

Mastering Android Application Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Getting Started
Introducing Material Design
Introducing Android 6 Marshmallow
Runtime permissions
Power-saving optimizations
Text selection
Fingerprint authentication
Direct share
Creating MasteringAndroidApp
Getting the tools ready
Summary
2. Designing our App
Selecting an app-navigation pattern
Basic structure
The dashboard pattern
The sliding panel
Tabs
Fragments
Understanding the importance of fragments
The Fragment Manager
Fragments stack
ViewPager
Adapter
Sliding tabs
Customizing tabs
Transitions
Summary
3. Creating and Accessing Content from the Cloud
Creating your own cloud database
Parse
Adding the Parse SDK to our project
Android's Application class
Creating the database
Storing and consuming content from Parse
Storing content
Consuming content
Displaying content
Google Volley and OkHttp
Google Volley
OkHttp
A lightning-fast network
JSON and Gson
Summary
4. Concurrency and Software Design Patterns
Concurrency in Android
Handlers and threads
Introducing AsyncTasks
Understanding services
A type of service – IntentService
Introducing loaders
The importance of patterns
The Singleton pattern
Singleton in the Application class
The Observer pattern
Introducing the Adapter pattern
Summary
5. Lists and Grids
Starting with lists
Using ListViews with built-in views
Creating a custom Adapter
Recycling views
Applying the ViewHolder pattern
Introducing RecyclerView
Using list, grid, or stack
Implementing RecyclerView
Clicking on RecyclerView items
Summary
6. CardView and Material Design
CardView and UI design tips
Introducing CardView
Design-time layout attributes
Working with custom fonts in Android
The design support library
Introducing TabLayout
Toolbar, action bar, and app bar
Adding motion with CoordinatorLayout
Back navigation and up navigation
Summary
7. Image Handling and Memory Management
Downloading images
The traditional way of downloading images
Downloading images with Volley
Introducing Picasso
Mastering images
Vector drawables
Animating with AnimatedVectorDrawable
Working with the nine patch
Memory management
Detecting and locating leaks
Preventing leaks
Activity and context references
Using WeakReference
Summary
8. Databases and Loaders
Creating the database
The database contract
The database open helper
Database Access Object
Performing a query
Using a raw query
Introducing cursors
Content providers
Sync database with UI
Implementing CursorLoader
RecyclerView and CursorAdapter
Introducing pull to refresh with SwipeRefreshLayout
Summary
9. Push Notifications and Analytics
Push notifications
Sending and receiving notifications using GCM
Push notifications with Parse
Using NotificationCompat
The importance of analytics
Analytics with Parse
The error report
Summary
10. Location Services
Configuring the project
Getting the API key
Displaying the debug certificate fingerprint
Creating a Google Developer Console project
Configuring AndroidManifest.xml
Adding the map
Adding the fragment
Implementing MapFragment
Adding a marker
Retrieving data from Parse
Displaying a marker for each location
Adding a title to a marker
Summary
11. Debugging and Testing on Android
Logs and the debug mode
Working with logs
Using Timber, the log wrapper
Debugging our app
Testing on Android
Unit tests with Robolectric
Robolectric configuration
Our first unit test
Running unit tests
Integration tests with Espresso
Espresso configuration
Writing an integration test
Running integration tests
Testing from a UI perspective
Launching The Monkey
Recording UI tests with MonkeyTalk
Continuous integration
Summary
12. Monetization, the Build Process, and Release
Using build variants
Creating build types
Product flavors
Monetization in Android
Key points in advertisement monetization
Adding advertisements with AdToApp
Releasing our app to Play Store
Code obfuscation
Exporting the app
Uploading our app to Play Store
Creating a publisher account
The Google Play Developer console
Publishing an app
Uploading the APK file
Preparing the store listing
Summary
Index

Mastering Android Application Development

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author(s), nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2015
Production reference: 1231015
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78588-422-1
www.packtpub.com

Credits

Author
Antonio PachĂłn Ruiz
Reviewers
BJ Peter DeLaCruz
Kyrre Havik Eriksen
Ankit Garg
Commissioning Editor
Veena Pagare
Acquisition Editor
Reshma Raman
Content Development Editor
Rashmi Suvarna
Technical Editor
Parag Topre
Copy Editor
Shruti Iyer
Project Coordinator
Judie Jose
Proofreader
Safis Editing
Indexer
Monica Ajmera Mehta
Graphics
Disha Haria
Abhinash Sahu
Production Coordinator
Conidon Miranda
Cover Work
Conidon Miranda

About the Author

Antonio PachĂłn Ruiz is a software engineer with a master's degree in mobile technologies. He has more than five years of experience working as an Android developer and has developed a large number of apps.
Antonio was born in southern Spain and currently lives in London working as an Android contractor; he works part time developing for different companies, such as TomTom, MasterCard, and the UK giant, British Telecom. His experience extends from small start-ups to big telecom companies. Video streaming apps, newsreader apps, Voice over IP, voice authentication, e-commerce, online payments, navigation, and games are some of the technologies Antonio has worked on.
He is also the director of SuitApps, a venture outsourcing apps remotely for other companies, where he leads and coaches a ...

Table of contents

  1. Mastering Android Application Development