saifi369 / AndroidCoroutines

Kotlin Coroutines for Android

Home Page:https://www.youtube.com/u4universe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kotlin Coroutines for Android

This project is used for Kotlin Coroutines tutorials on U4Universe Youtube channel.

Introduction

A coroutine is a concurrency design pattern that you can use on Android to simplify code that executes asynchronously. Coroutines were added to Kotlin in version 1.3 and are based on established concepts from other languages.

On Android, coroutines help to manage long-running tasks that might otherwise block the main thread and cause your app to become unresponsive. Over 50% of professional developers who use coroutines have reported seeing increased productivity.

We'll learn

1. Coroutines Basics

2. Coroutines with Room

3. Coroutines with Retrofit

Coroutines Basics Topics

  • What is a Routine?
  • Routine vs Coroutine?
  • Why we use Coroutines?
  • Android Project setup and running our first Coroutine
  • Download images using Coroutines
  • Threads vs Coroutines (Blocking call vs suspending call)
  • Suspend Functions
  • Coroutine Builders (launch, async & runBlocking)
  • Coroutine Scope and Context
  • Coroutine Dispatchers (Default, Main, IO)
  • Change Coroutine thread/context using withContext
  • Rest of the topics will be covered in another branch

Contact Info

You can contact me if you have any problem related to code or video.

Instagram

Facebook

Gmail chsaif369@gmail.com

Note

This repository contains multiple branches. Each video uses its own branch, so make sure to check the branch used in the video and then select that branch from branch list.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.