This article is part of Today I Learned series and was originally posted at my TIL Github Repository and my website at wajahatkarim.com

Today, when I was working on a project, so I had a situation where I had to perform a very tiny operation in background in Android. I had lots of ideas such as AsyncTask or Thread or using such powerful framework like RxJava or using new APIs such as JobDispatcher or WorkManager etc. You can read about these options in this good article by Ali Muzaffar.

But my major concern was that my requirement was a very simple and little one. I wanted to get address from the location in form of latitude and longitude. And I wanted to do it in background along with showing ProgressBar and stuff. You can check the below GIF image as the result of what I did.