Kotlin-Flow-Android-Examples icon indicating copy to clipboard operation
Kotlin-Flow-Android-Examples copied to clipboard

Kotlin-Flow-Android-Examples - Learn Flow for Android by Examples

Mindorks Mindorks Community Mindorks Android Store Open Source Love License

About this project:

  • If you want to get started with Kotlin Flow, then this project is for you.
  • Common use-cases of Kotlin Flow in Android has been implemented in this project.
  • This is your one-stop solution for learning Kotlin Flow for Android Development.

Steps to learn Kotlin Flow by examples from this project

  • First, learn the concepts of Kotlin Flow from this blog
  • Understanding Terminal Operators in Kotlin Flow. Learn from here
  • Creating Flow Using Flow Builder in Kotlin. Learn from here
  • Exception Handling in Kotlin Flow. Learn from here
  • StateFlow APIs in Kotlin. Learn from here
  • Implement Instant Search Using Kotlin Flow Operators. Learn from here
  • Kotlin Flow Retry Operator with Exponential Backoff Delay. Learn from here
  • Zip Operator for Parallel Multiple Network Calls. Learn from here
  • Then, just clone, build, run the project and start learning Kotlin Flow by examples.

This Kotlin Flow Example Project will help you in learning the following for Android App Development:

  • What is Kotlin Flow?
  • How to use Kotlin Flow in Android?
  • Step by Step guide on how to implement the Kotlin flow in Android?
  • Doing simple task in Kotlin Flow
  • Using operators like filter, map, reduce, flatMapConcat, zip, and etc.
  • Exception in Kotlin Flow
  • How to use onCompletion in Flow?
  • Retry Task using retry operator in Flow
  • Retry Task with Exponential Backoff in Flow
  • Using Kotlin Flow with Retrofit.
  • Using Kotlin Flow with Room Database.
  • Making two network calls in parallel using Kotlin Flow.
  • Doing task in series using Kotlin Flow.
  • Unit test in Flow.

Kotlin Flow Examples for Android Development:

  • Single Network Call: Learn how to make a network call using Kotlin Flow. This is a very simple use-case in Android App Development.

    • Activity Code
    • ViewModel Code
  • Series Network Call: Learn how to make network calls in series using Kotlin Flow. This is useful when you want to make a network call which is dependent on an another network call.

    • Activity Code
    • ViewModel Code
  • Parallel Network Call: Learn how to make network calls in parallel using Kotlin Flow. This is useful when you want to make a network call which is dependent on an another network call.

    • Activity Code
    • ViewModel Code
  • Room Database Operation: Learn how to fetch or insert entity in database using Kotlin Flow. This is useful when you are using Room Database in your Android Application.

    • Activity Code
    • ViewModel Code
  • Long Running Task: Learn how to do a long running task using Kotlin Flow. If you want to do any of your task in background thread using the Kotlin Flow, then this is useful.

    • Activity Code
    • ViewModel Code
  • Two Long Running Tasks: Learn how to run two long running tasks in parallel using Kotlin Flow.

    • Activity Code
    • ViewModel Code
  • Catch Error Handling: Learn how to handle error in Kotlin Flow using Catch.

    • Activity Code
    • ViewModel Code
  • EmitAll Error Handling: Learn how to handle error in Kotlin Flow using emitAll.

    • Activity Code
    • ViewModel Code
  • Completion:

    • Activity Code
    • ViewModel Code
  • Reduce:

    • Activity Code
    • ViewModel Code
  • Map:

    • Activity Code
    • ViewModel Code
  • Filter:

    • Activity Code
    • ViewModel Code
  • Search Feature: Implement Search Using Kotlin Flow Operators - Debounce, Filter, DistinctUntilChanged, FlatMapLatest.

    • Activity Code
  • Retry:

    • Activity Code
    • ViewModel Code
  • RetryWhen:

    • Activity Code
    • ViewModel Code
  • Retry with Exponential Backoff:

    • Activity Code
    • ViewModel Code

If this project helps you in anyway, show your love :heart: by putting a :star: on this project :v:

Explore Android Online Tutorials and Courses To Learn More by MindOrks

  • Ride-Sharing Uber Lyft Android App - Learn to build a ride-sharing Android Taxi Clone App like Uber, Lyft - Open-Source Project By MindOrks
  • Android Tutorial - All Free Android Tutorials by MindOrks
  • Android Online Course for Professionals - In this online course, you’ll learn the Dagger, Kotlin, RxJava, MVVM Architecture, Architecture Components, Jetpack, LiveData, ViewModel, Room Database, Database Design, Multithreading, Memory Management, Networking, Caching, How Glide works, Unit Testing, and the best practices for Android Development. By the end of this online course, you will have all the skills you need to become a professional Android Developer.
  • Android Online Course for Beginners - This course is for beginners for those who want to get started with Android Development. In this course, you will build two apps: TodoNotes and Ride-Sharing Uber Android App.

Kotlin-Coroutines-Android-Examples - Check here

Check out MindOrks awesome open source projects here

License

   Copyright (C) 2020 MINDORKS NEXTGEN PRIVATE LIMITED

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.