This talk was given at Android BBQ Meetup

In our last project, we had to implement checks to ensure GPS is enabled on the device and Location Permission is granted by the user. It is important to highlight that both are critically needed to ensure the app can perform Location Tracking in background. Our best bet was to inform visually when the app is in the foreground or background in order to encourage the user to fulfill one or both of these requirements. This was only possible when UI (Activity/Fragment) and Service can listen to changes in GPS and Runtime Permission and react accordingly.

I faced several challenges while doing that and decided to solve it using LiveData.

Slides

Articles

Later, I ended up publishing detailed articles (Part 1 and Part 2) along with the github repo. If you are looking for just a quick summary then you can read it here.