Table of Contents
Android Studio Cookbook
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
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. Welcome to Android Studio
Introduction
Reasons why we should use Android Studio
Fragmentation
Creating your first app called Hello Android Studio
Getting ready
How to do it...
How it works...
The use of Gradle build scripts
There's more...
See also
Testing your app with an emulator called Genymotion
Getting ready
How to do it...
There's more...
Refactoring your code
How to do it…
How it works...
See also
2. Applications with a Cloud-based Backend
Introduction
Setting up Parse
Getting ready
How to do it...
How it works...
There's more...
Consuming data from the cloud
Getting ready
How to do it...
There's more...
Submitting data to the cloud
Getting ready
How to do it…
How it works...
There's more...
See also
3. Material Design
Introduction
Reycler views and card views
Getting ready
How to do it...
Using card views
There's more...
Ripples and elevations
Getting ready
How to do it...
There's more...
See also
Great transitions
Getting ready
How to do it…
Theming
How it works...
There's more...
4. Android Wear
Wearables
Fullscreen wearable app
Getting ready
How to do it...
There's more...
See also
Watch faces
Getting ready
How to do it…
There's more...
Notifications
Getting ready
How to do it...
There's more...
See also
5. Size Does Matter
Size and context
Phone, phablet, and tablet
Getting ready
How to do it...
Glue it together!
There's more...
Media playback
Getting ready
How to do it...
There's more...
TV and media centre
Getting ready
How to do it...
There's more...
See also
6. Capture and Share
Introduction
Capturing images the easy way
Getting ready
How to do it...
There's more...
Image capturing using the Camera2 API
Getting ready
How to do it...
Collapsing all methods
Adding the sepia effect
There's more...
Image sharing
Getting ready
How to do it...
Orientation issues
Getting ready
How to do it...
There's more...
See also
7. Content Providers and Observers
Introduction
Content providers
There's more...
Design patterns
RxJava
See also
Consuming and updating data using a content provider – daily thoughts
Getting ready
How to do it...
Queries
Loader manager
See also
Change projections to display KPIs in your app
Getting ready
How to do it...
See also
Communicate with other apps using content providers
Getting ready
How to do it...
There's more...
See also
8. Improving Quality
Introduction
Patterns and support annotations
MVC
MVP
The observer pattern
The factory pattern
The singleton
Support annotations
Google Play services
Getting ready
How to do it...
Leaderboards
Let the game begin!
There's more...
See also
Unit testing using Robolectric
Getting ready
How to do it...
There's more...
Espresso
Approaches
Cucumber, Gherkin, and Calabash
First things first!
See also
Code analysis
Getting ready
How to do it...
See also
9. Improving Performance
Introduction
Memory profilers and performance tools
Getting ready
How to do it...
There's more...
See also
Here comes the bad app – performance improvements
Getting ready
How to do it...
There's more...
Overdraw issues
Getting ready
How to do it...
What layout type to use?
There's more...
See also
10. Beta Testing Your Apps
Introduction
Build variants
Getting ready
How to do it...
Build variants
Build types
There's more...
Runtime permissions
Getting ready
How to do it...
There's more...
Play Store beta distribution
Getting ready
How to do it...
Rate your app
Have a break
There's more...
Index
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 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-78528-618-6
www.packtpub.com
Cover image by Wim Wepster
Author
Mike van Drongelen
Reviewers
Aliaksandr Zhukovich
Ankit Garg
Nico Küchler
Acquisition Editor
Nikhil Karkal
Content Development Editor
Zeeyan Pinheiro
Technical Editor
Pranjali Mistry
Copy Editor
Neha Vyas
Project Coordinator
Suzanne Coutinho
Proofreader
Safis Editing
Indexer
Monica Ajmera Mehta
Graphics
Disha Haria
Production Coordinator
Arvindkumar Gupta
Cover Work
Arvindkumar Gupta
Mike van Drongelen started developing software from the very first moment he had access to a computer. At the age of nine, he started programming in an obscure Basic variant. Currently, he works as a mobile solution consultant in the Netherlands. Besides this, he also runs his own start-up. He speaks English, Dutch, German, and a little French, but most of the time, he speaks Java, JavaScript, HTML, Objective C, Swift, C#, and ASP.NET. He develops Android, iOS, and .NET solutions for various customers and has some...