I need to request runtime location permissions for the FusedLocationProviderClient api and, once I have them, obtain Location objects and feed them to an algorithm that will make a query to an endpoint. The results of such a query will be used to update my map View. As of now, I'm using MVVM, so I have an Activity showing the Map, and its ViewModel implementing LiveData objects to update the View, and a Repository class to perform network operations.
My doubts are essentially about where to ask for runtime permissions (I'm using EasyPermissions library). I know that I have to implement permission checks methods in the Activity, however I find myself at odds with how to proceed then: do I have to also implement a listener for location updates in the Activity? If so, how do I then send that data to the repo for the query (the View will then be updated with Observer pattern)? In a way, it would be more convenient for me to ask for permissions in the repo since that's where I'll immediately use the location objects.