Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Android App Components: Fragments & Background Services
Rating: 3.7 out of 5(21 ratings)
101 students

Android App Components: Fragments & Background Services

Master flexible UIs & build powerful background capabilities into Android apps, monitor your data streams & take action
Last updated 5/2019
English

What you'll learn

  • How to implement multiple code samples.
  • Learn how to send work requests to the background service.
  • Create layouts for multiple screens at runtime.
  • Perform long-running tasks using background services.
  • Master restrictions in using background services in Android Oreo along with workarounds such as using JobIntentService.
  • Deal with common problems and issues that might arise when using the services in your live projects.

Course content

2 sections66 lectures5h 47m total length
  • The Course Overview4:12

    This video will give you an overview about the course.

  • Configure Android Studio and Create Your Project3:34

    The aim of this video is to explore the best practices of setting up your project.

    • Start your Kotlin project

    • Find out about the importance of your package name

    • Learn to decide the best API number according to your projects

  • Create a Layout and Explore Layout Editor7:28

    The aim of this video is to explore the layout editor and create your layouts faster.

    • Create your empty layout

    • Explore the layout editor and its options

    • Learn to preview your design in development

  • Create Your Fragment Class3:26

    The aim of this video is to explore Android studio's configure component to create fragments.

    • Create your fragment and its related XML at the same time using Android Studio's configure component

    • Explore the support library and platform to create fragments

    • Inflate your fragment's layout

  • Display Your Fragment2:50

    The aim of this video is to display your fragment statically inside an activity.

    • Define your fragment inside your activity

    • Find out when to use static fragments

    • Display your fragment inside your activity

  • Handling Fragment’s Lifecycle5:43

    The aim of this video is to help you understand fragment's lifecycle, their execution order, and implementation.

    • Explore fragment lifecycle and learn about your fragment’s visibility

    • Explore the order of lifecycle events execution

    • Explore each lifecycle event in detail

  • Co-Ordinating with Your Activity's Lifecycle1:47

    The aim of this video is to help you explore the best ways to communicate between your activity and fragment within their life cycles.

    • Explore how an activity’s lifecycle affects its attached fragment

    • Explore the order of lifecycle events execution

    • Learn to coordinate with your activity

  • Displaying Your Fragment Programmatically4:35

    The problem with inflating your fragment inside activity xml is that they are static. In this video, we will explore more dynamic solutions.

    • Inflate your fragment within your activity

    • Display your fragment on emulator

    • Explore fragment's transaction

  • Add and Remove Fragments3:06

    The aim of this video is to explore how to add and remove your fragment.

    • Add your fragment within onclick event

    • Remove your fragment within onclick event

    • Learn how to handle and issue fragments

  • Replacing Fragments3:14

    The aim of this video is to learn how to replace your fragment.

    • Learn to replace fragments constantly

    • Explore how to make your UI more dynamic

    • Explore fragment replacement via fragment transaction

  • Handling Configuration Changes While Adding, Removing, and Replacing Fragments7:33

    Configuration changed might cause user session loss or in worse, app crash. In this video, we will learn to handle configuration changes while adding, removing, and replacing fragments, as safe as possible.

    • Dive deep into configuration changes concept

    • Learn to handle configuration changes while adding, removing, and replacing fragments

    • Learn to handle configuration changes by TAG and ID of your fragment

  • Exploring Back Stack4:30

    User Back button click while in process, might cause user session loss or in worse, app crash. In this video, we will explore the concept of back stacks deeply and will handle back button.

    • Dive deep into back stack concept

    • Learn to handle back button press

  • Communicating with Activity – Creating Event Callbacks8:24

    The aim of this video is to help you understand fragment's communication with an activity using event callbacks.

    • Learn how to find a view from the activity and the fragment

    • Explore the callback concept and the best times to use it

    • Explore call back events and learn to use them for communicating between activity and fragment

  • Communicating with Activity – Pass Arguments5:40

    The aim of this video is to help you understand fragment's communication with activity using Bundles.

    • Explore the Bundle concept

    • Explore the Argument concept

    • Pass an argument to communicate with your fragment

  • Communicating with Activity – Factory Method2:59

    The aim of this video is to help you understand the fragment's communication with activity using factory method.

    • Learn the factory pattern

    • Use factory pattern to communicate with your fragment

    • Explore the usage of interfaces in factory method while communicating with fragments

  • Communication between Fragments within Activity8:22

    The aim of this video is to help you understand the communication between fragments within the activity.

    • Pass data from one fragment to the container activity and receive it from another fragment

    • Explore the log concept and the best ways to use it

    • Use factory method and event callbacks at the same time to communicate with fragments

  • View Model3:42

    The aim of this video is to explore the view model.

    • Learn about view model scope

    • Explore the relation between your activity or fragment lifecycle and the view model

    • Add view model to your project

  • Communicating with Fragments – View Model6:43

    The aim of this video is to help you understand the communication between fragments using view model.

    • Implement view model in your project

    • Pass data using a view model class

    • Explore the benefits of using the view model

  • Explore Screen Compatibility5:02

    The aim of this video is to help you explore screen compatibility.

    • Learn about the features to make a screen compatible UI

    • Learn to disable the compatibility

  • Measuring Screen Size5:29

    The aim of this video is to help you understand how you can measure screen size programmatically.

    • Measure screen width

    • Measure screen height

    • Measure screen pixel density

  • Using the Right Layout5:16

    The aim of this video is to help you understand how Android system handles different screen sizes.

    • Create a master-detail application

    • Specify width limitation for your layout

    • Change your layout at runtime

  • Using Fragments as Dialogues3:13

    The aim of this video is to implement a fragment dialogue.

    • Explore the full screen concept

    • Create the layout for the full screen

  • Using Fragments as ViewPager6:47

    The aim of this video is to learn how to implement ViewPagers.

    • Implement a ViewPager

    • Create an adapter for your ViewPager

    • Handle the back button with ViewPager

  • Services4:14

    The aim of this video is to help you explore services.

    • Learn about process, thread, and service

    • Learn what services are

    • Explore service types

  • Explore Service’s Lifecycle3:35

    The aim of this video is to help you understand service lifecycle.

    • Explore lifecycle callbacks

    • Define your service in the manifest

  • Create a Service5:25

    The aim of this video is to help you understand how you can create and start a service.

    • Learn to start a service from another component

    • Learn to trace the events of a service

    • Explore onstartcommand flags

  • IntentService()2:33

    The aim of this video is to help you explore IntentServices.

    • Explore the intent service events

    • Explore how intent services handle multithreading

  • Handling Long-Running Tasks5:06

    The aim of this video is to help you understand how to handle long-running tasks with services.

    • Add a thread to the code and see how the app crashes

    • Create an async task to handle the process

    • See the result

  • Bound Services6:15

    The aim of this video is to help you explore bound services.

    • Learn to connect to your bound service within your activity

    • Customize your service to make it boundable

  • Messenger3:18

    The aim of this video is to help you understand how you can use messengers in your application.

    • Learn to connect to your messenger within your activity

    • Learn to create a messenger handler

    • Learn to pass data to you messenger class

  • AIDL3:55

    The aim of this video is to help you understand how to implement AIDL file.

    • Learn to create an AIDL file

    • Learn to bound to an AIDL service

    • Learn how to change your service to bound to an AIDL

  • Explore IPC2:17

    The aim of this video is to help you learn inter process communication (IPC).

    • Explore the IPC concept

    • Learn to choose between AIDL and messenger

  • Start a Foreground Service3:24

    The aim of this video is to learn how to implement a foreground service.

    • Create a notification within your service

    • Learn to handle creating a foreground service for Android O

  • Explore the Initial Project2:06

    The aim of this video is to help you explore the initial project that we are going to develop.

    • Learn how to create a basic ToDo list app

    • Learn how to create a layout for your fragment dialog

  • Add Fragments to the Project4:06

    The aim of this video is to help you add a dialog fragment to your project and pass the input value to your activity.

    • Learn to create a class for your fragment dialog

    • Learn to get input from the fragment dialog

    • Learn to pass data from the fragment dialog to the activity

  • Add Services to the Project1:28

    The aim of this video is to help you interact with your service.

    • Pass the data in your service

    • Start your service

  • Interact with Your Service from the Fragment3:54

    The aim of this video is to help you interact with your service from the fragment.

    • Pass data to your service

    • Display your received data as a notification

Requirements

  • A basic understanding of Kotlin would be an added advantage but isn't mandatory.
  • Experience with background services will not be required.

Description

Are you willing to learn the basic functionality of how services and fragments work, build applications working in the background, by exposing you to using Android Background Service capabilities effectively? Then this course is for you

This hands-on course you will start by getting familiar with the fundamental concepts of fragments and adding fragments to an activity, fragment transactions & much more. Then 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. Moving further you will learn to use IntentService, which utilizes a worker or background thread to execute tasks, explore what's new in the Background Service in Android Oreo and check out its limitations, and then overcome those limitations.

Contents and Overview

This training program includes 2 complete courses, carefully chosen to give you the most comprehensive training possible.

The first course, Hands-On Android Application Components: Services and Fragments 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 built 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 second course, Hands-on Background Services in Android you will learn a variety of topics like starting and stopping your service, interacting with the background service and creating and sending a work request, exploring the lifecycle of your service along with understanding the security issues in using it. You will learn to use IntentService, which utilizes a worker or background thread to execute tasks. You will explore what's new in the Background Service in Android Oreo and check out its limitations, and then overcome those limitations. You will then learn the best practices and how to deal with problems and issues that might arise. By the end of the course, you will have a strong foundation in background services in Android and will be able to build the functionality you need to ensure you won't drain the battery excessively, compromise the user's security, consume too much data, or hamper the device's performance.

About the Authors:

  • Mona Vafa is an energetic mobile developer with 4+ years' robust code experience in Java-Android and iOS. She enjoys every minute spent developing apps on her computer. There is always something new to learn so what she loves the most is being challenged and sharing her experience. Currently, Mona is working as a freelance software developer and is a proud online trainer. Apart from this, she loves to travel, explore new places, and read books.

  • Book of Brains creates and distributes high-quality technology training content. We aim to teach technology the way it is used in industry and the professional world. Our trained team of professionals delivers hands-on workshops and training content for mobile as well web development technologies. We constantly monitor current industry trends and keep our training materials and workshops up to date.

Who this course is for:

  • This course targets Android developer, UI/UX designer, mobile developer keen to enhance their application user interface design skills will benefit from this course.