Android Studio Cookbook
eBook - ePub

Android Studio Cookbook

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

Android Studio Cookbook

About this book

Design, test, and debug your apps using Android Studio

About This Book

  • See what Material design is about and how to apply it your apps
  • Explore the possibilities to develop apps that works on any type of device
  • A step-by-step practical guide that will help you build improved applications, change their look, and debug them

Who This Book Is For

This book is for developers that are already familiar with programming concepts and have already started creating apps for the Android platform, for example, by using the Eclipse IDE. It is for developers who intend to use Android Studio as their primary IDE or want to use Android Studio more efficiently.

What You Will Learn

  • Develop Android Studio applications using Genymotion
  • Apply the concepts of Material design to your applications
  • Use memory monitoring tools to tweak performance
  • Build applications for Android Wearable
  • Capture images, video, or audio within your Android app
  • Use content providers to display data
  • Build apps with a cloud-based backend
  • Create media-related apps that will run on phones, phablets, tablets, and TVs

In Detail

This book starts with an introduction of Android Studio and why you should use this IDE rather than Eclipse. Moving ahead, it teaches you to build a simple app that requires no backend setup but uses Google Cloud or Parse instead. After that, you will learn how to create an Android app that can send and receive text and images using Google Cloud or Parse as a backend. It explains the concepts of Material design and how to apply them to an Android app. Also, it shows you how to build an app that runs on an Android wear device.

Later, it explains how to build an app that takes advantage of the latest Android SDK while still supporting older Android versions. It also demonstrates how the performance of an app can be improved and how memory management tools that come with the Android Studio IDE can help you achieve this.

By the end of the book, you will be able to develop high quality apps with a minimum amount of effort using the Android Studio IDE.

Style and approach

This is a practical guide full of challenges and many real-world examples that demonstrate interesting development concepts. Besides smartphones and tablets, it also covers Android wearable devices and Android TV. Although strongly recommended, it is not necessary to own any Android device yourself.

Tools to learn more effectively

Saving Books

Saving Books

Keyword Search

Keyword Search

Annotating Text

Annotating Text

Listen to it instead

Listen to it instead

Android Studio Cookbook


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

Android Studio Cookbook

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

Credits

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

About the Author

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...

Table of contents

  1. Android Studio Cookbook

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
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 990+ topics, we’ve got you covered! Learn about our mission
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 about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Android Studio Cookbook by Mike van Drongelen 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.