Hands-On Android Application Components: Services and Fragments

Video description

Master flexible UIs and build next-level Android apps

About This Video

  • Dive into developing Android apps with practical hands-on examples to help you at each stage
  • Detailed, accurate walkthroughs showing you how to create fragments with the latest Android Studio
  • Practical lessons on understanding the wider context of Kotlin

In Detail

It's always been a big pain for developers to understand the implementation of background threads and processes and master building flexible UI's and how to effectively use services in their applications. Not all Android developers have any experience of fragments, but this course will help you master fragments and services from scratch!

In this course, you will start by getting familiar with the fundamental concepts of fragments and adding fragments to an activity, fragment transactions, their lifecycle, and how they communicate with activities. You'll also explore fragment stability during screen rotation, and screen sizes. Then you will learn about services, another application component that will continue to run in the background even if the user switches to another application. Here you will get hands-on with the various kinds of services, threads, and processes, and their life cycle; then you'll move on to inter-process communication. Lastly, you will implement everything you've learned and build a TODO application; you'll learn to pass and manage arguments and master the communication flow between services and fragments in multiple ways. By the end of this course, you'll have a very strong foundation in Android fragments and Android services.

The code bundle for this course is available at https://github.com/PacktPublishing/Hands-on-Android-Application-Components-Services-and-Fragments

Downloading the example code for this course: You can download the example code files for all Packt video courses you have purchased from your account at http://www.PacktPub.com. If you purchased this course elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of contents

  1. Chapter 1 : Creating Your Fragment Class and Inflating Your Layouts
    1. The Course Overview 00:04:13
    2. Configure Android Studio and Create Your Project 00:03:34
    3. Create a Layout and Explore Layout Editor 00:07:28
    4. Create Your Fragment Class 00:03:27
    5. Display Your Fragment 00:02:51
  2. Chapter 2 : Adding Fragments to Activities and Handling Its Lifecycle
    1. Handling Fragment’s Lifecycle 00:05:44
    2. Co-Ordinating with Your Activity's Lifecycle 00:01:48
    3. Displaying Your Fragment Programmatically 00:04:36
    4. Add and Remove Fragments 00:03:06
    5. Replacing Fragments 00:03:15
    6. Handling Configuration Changes While Adding, Removing, and Replacing Fragments 00:07:34
    7. Exploring Back Stack 00:04:30
  3. Chapter 3 : Communicating with Fragments
    1. Communicating with Activity – Creating Event Callbacks 00:08:24
    2. Communicating with Activity – Pass Arguments 00:05:40
    3. Communicating with Activity – Factory Method 00:03:00
    4. Communication between Fragments within Activity 00:08:23
    5. View Model 00:03:43
    6. Communicating with Fragments – View Model 00:06:44
  4. Chapter 4 : Implementing Fragments for Multiple Usages
    1. Explore Screen Compatibility 00:05:03
    2. Measuring Screen Size 00:05:30
    3. Using the Right Layout 00:05:17
    4. Using Fragments as Dialogues 00:03:14
    5. Using Fragments as ViewPager 00:06:47
  5. Chapter 5 : Exploring Services
    1. Services 00:04:14
    2. Explore Service’s Lifecycle 00:03:36
    3. Create a Service 00:05:26
    4. IntentService() 00:02:34
    5. Handling Long-Running Tasks 00:05:06
  6. Chapter 6 : Implementing Services and Sending Notifications
    1. Bound Services 00:06:15
    2. Messenger 00:03:19
    3. AIDL 00:03:55
    4. Explore IPC 00:02:17
    5. Start a Foreground Service 00:03:24
  7. Chapter 7 : Explore Communication between Service and Fragment
    1. Explore the Initial Project 00:02:06
    2. Add Fragments to the Project 00:04:06
    3. Add Services to the Project 00:01:29
    4. Interact with Your Service from the Fragment 00:03:54

Product information

  • Title: Hands-On Android Application Components: Services and Fragments
  • Author(s): Mona Vafa
  • Release date: March 2019
  • Publisher(s): Packt Publishing
  • ISBN: 9781789614428