Update the bitmap factory and the location request. Fixed #53

This commit is contained in:
Tommaso Berlose
2020-05-05 01:32:51 +02:00
parent bea0803c3a
commit 4feb72381d
45 changed files with 56 additions and 40 deletions

View File

@ -24,7 +24,7 @@ object WeatherHelper {
val networkApi = WeatherNetworkApi(context)
if (Preferences.customLocationAdd != "") {
networkApi.updateWeather()
} else if (context.checkGrantedPermission(Manifest.permission.ACCESS_FINE_LOCATION)) {
} else if (context.checkGrantedPermission(Manifest.permission.ACCESS_BACKGROUND_LOCATION)) {
LocationServices.getFusedLocationProviderClient(context).lastLocation.addOnCompleteListener { task ->
if (task.isSuccessful) {
val location = task.result