Expert Android Programming

Book description

Become a pro with the latest Android SDK and create state of the art applications for Android.

About This Book

  • Dive deep into Android development with practical hands on examples to help you in each stage.
  • Develop smart professional grade apps for the latest Android N version and become a pro android developer.
  • Unclog your development highway by utilising the industry standard best practices techniques.

Who This Book Is For

This book is for mobile developers having some expertise in building android apps and who wish to now take a leap into building complex app such as Zomato, using latest Android N power of Google.

What You Will Learn

  • Building UI/UX following best industry practices
  • Development of Zomato Clone
  • Measure and improve app performance
  • Improving app using test mechanisms
  • Bringing the app live on the play store

In Detail

Android O brings a number of important changes for the users as well as the developers. If you want to create smart android applications which are fast, lightweight and also highly efficient then this is the book that will solve all your problems.

You will create a complex enterprise grade app in this book. You will get a quick refresher of the latest android SDK and how to configure your development environment. Then you will move onto creating app layouts, component and module building, creating smart and efficient UIs. The most important part of a modern day app is how real time they are. With this book, you will create a smooth back-end for your app, ensure dynamic and real time communication between different app layers. As we move on, you will learn to leverage the different Android APIs and create an efficient SQLite data layer for your apps. You will implement effective testing techniques to make your app reliable and robust and finally you will learn to deploy it efficiently. The multiple stages of android development will also be simplified by giving you an industry standard set of best practices.

Style and approach

This book will have a dedicated practical tutorial style approach with focus on professional & enterprise grade android app development. The examples in each chapter will be modular and will also help you to create a complete fully fueatured android app by the end of the book.

Table of contents

  1. Preface
    1. Introduction
    2. What this book covers
    3. What you need for this book
    4. Who this book is for
    5. Conventions
    6. Reader feedback
    7. Customer support
      1. Downloading the example code
      2. Downloading the color images of this book
      3. Errata
      4. Piracy
      5. Questions
  2. Understanding the Gradle System
    1. Stepping into the Gradle world
    2. Adding Gradle to your app
    3. Adding a new Gradle library
      1. Adding a Gradle identifier
      2. Adding as a module
    4. Summary
  3. Exploring Android Studio Developer Tools
    1. APK Analyzer
      1. Reducing the APK file size with APK Analyzer
    2. Understanding basic battery drain
    3. Batterystats and Battery Historian
    4. Memory Monitor
      1. Wondering what the various causes of memory increase are?
      2. Logcat
    5. Summary
  4. Leap into the Android Support Library
    1. The Android Support Library
      1. v4 Support Library
      2. v7 Support Library
      3. Multidex Support library
      4. v8 Support Library
      5. v13 Support Library
      6. Annotations Support Library
      7. Design Support Library
      8. Custom Tabs Support Library
    2. Summary
  5. Google Play Services
    1. The architecture
    2. Google Maps
    3. Summary
  6. Material Design
    1. Wireframing and tools to gather feedback
      1. Understanding the wireframing process (tangible and digital)
    2. Material UI for Android developers
      1. Building meaningful motions
        1. Floating Action Button (FAB)
        2. Implementing Search in Zomato
      2. Building the UX Design
      3. Understanding UX principles and how it's different from UI
    3. Summary
  7. SOLID Android Development and Its Design Principles
    1. Single Responsibility Principle
    2. Open-Closed Principle
    3. Liskov Substitution Principle
    4. Interface Segregation Principle
    5. Dependency Inversion Principle
    6. Summary
  8. Understanding MVC, MVP, MVVM and Clean Arch Patterns
    1. MVC (Model View Controller)
    2. MVP (Model View Presenter)
    3. MVVM
    4. Clean Architecture Pattern
      1. Understanding the layers of Clean Architecture
    5. Summary
  9. Decision Making
    1. How to begin
    2. Creational patterns
      1. Builder
      2. Dependency injection
      3. Singleton
    3. Structural patterns
      1. Adapter
      2. Facade
    4. Behavioral pattern
      1. Command
        1. Observer
        2. Model View Controller
        3. Model View Presenter
        4. Model View View-Model
    5. Summing up MVP and MVC
    6. Refactoring your app
      1. What are the advantages of refactoring?
      2. How is refactoring done?
      3. When should you refactor?
      4. What code needs to be refactored?
        1. Bloaters
        2. Object-orientation abusers
        3. Change preventers
        4. Dispensables
        5. Data class
        6. Couplers
      5. How do I refactor my code?
      6. Refactoring of methods
        1. Extract method
        2. Inline method
      7. Extract variable
        1. Inline temp
        2. Replace temp with query
        3. Split temporary variable
        4. Remove assignments to parameters
        5. Replace method with method object
        6. Substitute algorithm
    7. Summary
  10. Performance Matters
    1. Improving display performances
      1. Optimizing layouts
        1. Optimizing layout hierarchies
      2. Views on demand
        1. Define a ViewStub
      3. Improving scrolls and other elements in the app
        1. Using a background thread
        2. Holding view objects in a ViewHolder
        3. Understanding network requests, computation and memory
      4. Collecting, analyzing and optimizing the network and network traffic
        1. Collection network traffic information
          1. Taging network requests
          2. Configuring a network test build type
          3. Deploying the network test APK
          4. Runing the network traffic tool
          5. Analyzing Network Traffic Data
          6. Analyzing network traffic types
          7. Optimizing network use
      5. Batching and Job Schedulers
      6. JobInfo
      7. JobService
      8. JobScheduler
      9. Effective use of Extended Doze and Standby
        1. Understanding Doze
        2. Doze restrictions
        3. Adapting your app to Doze
      10. Understanding App Standby
      11. Testing with Doze and App Standby
      12. Threads and Pools
        1. Specifying the Code to Run on a Thread
        2. Creating a Thread Pool
        3. Running Code on a Thread Pool Thread
        4. Communicating with the UI Thread
      13. Memory optimization
        1. Treating Battery as part of user's experience
      14. Understanding what causes battery drain
        1. Why Battery Optimization is required?
        2. Strategies for battery optimization
    2. Effective consumption of battery in Zomato
      1. Monitoring changes in charging state
        1. Determining the current battery level
    3. Improving app with battery analyser
    4. Summary
  11. Building Restaurant finder
    1. App sections
      1. Splash, Login, and Signup (including Google and Facebook)
      2. The Signup Flow
      3. Discovery Screen
      4. Database
      5. Room
    2. Summary
  12. Backend Service
    1. Realtime Database
      1. How to write a database structure
      2. Add security to data structure
    2. Firebase Cloud Messaging
    3. Remote configuration
    4. Authentication
    5. Storage
    6. Summary
  13. App Quality Service
    1. Firebase Test Lab
    2. Summary
  14. Grow Up
    1. Dynamic links
    2. App indexing
    3. Admob
      1. Banner Ads
        1. Ad lifecycle event callbacks
        2. Discouraged banner implementations
        3. Recommended banner implementations
        4. Interstitial Ads
        5. Discouraged interstitial implementations
        6. Interstitial ad implementations
      2. Summary
  15. Testing
    1. Testing Mechanisms (Functionality , Performance , Security , and Compatibility)
      1. Software Testing Life Cycle (STLC)
      2. Organizing for Software Testing
        1. Integration Testing
        2. Top-down integration testing
        3. Bottom-up integration testing
        4. Regression testing
        5. Smoke testing
        6. Acceptance Testing
        7. Alpha test
        8. Beta test
        9. Performance Testing
        10. Security Testing
        11. Compatibility Testing
      3. Automating User Interface Tests
        1. Testing UI for a single app
        2. Testing App using Espresso in Android Studio
        3. Setting up Espresso in Android Studio
      4. Create an Espresso Test Class
        1. Specifying a View Matcher
        2. Performing Actions
        3. Test your activities in isolation with Espresso Intents
        4. Testing WebViews with Espresso Web
        5. Verifying Results
    2. Testing UI for Multiple Apps
      1. Set Up the UI Automator
        1. Inspecting the UI on a device
        2. Ensuring your Activity is accessible
          1. Selector Specification
        3. Performing Actions
        4. Tools and Techniques: Espresso and Monkeyrunner
        5. Robotium
      2. The UI Animator
      3. Espresso
      4. Monkeyrunner
    3. Summary
  16. Preparing for Google Play
    1. Versioning Your App
      1. Generating a signed APK
    2. Preconfiguring to automatically Sign Your APK
      1. Android Instant Apps
      2. Alpha and Beta testing the App
      3. Preparing App Store Listing
      4. Device Catalog
        1. App signing
        2. Android Vitals
      5. User Feedback and Analytics
    3. Summary
  17. Understanding App Store Analytics for Optimization
    1. Keep an eye on Google Play policies
      1. Get your app title right
      2. Effectively using keywords in description
      3. Does your icon reflect the app theme?
      4. Are your app screenshots nailing it?
      5. Video can be a crowd puller
      6. Responding to reviews
      7. Are you LOCALizing?
    2. Summary

Product information

  • Title: Expert Android Programming
  • Author(s): Prajyot Mainkar
  • Release date: September 2017
  • Publisher(s): Packt Publishing
  • ISBN: 9781786468956