You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 23, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: LocationUpdatesBackgroundKotlin/app/src/main/java/com/google/android/gms/location/sample/locationupdatesbackgroundkotlin/data/LocationRepository.kt
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -83,6 +83,11 @@ class LocationRepository private constructor(
83
83
*/
84
84
val receivingLocationUpdates:LiveData<Boolean> = myLocationManager.receivingLocationUpdates
85
85
86
+
/**
87
+
* Status of whether the Location Services are available.
88
+
*/
89
+
val locationServicesAvailable:LiveData<Boolean> = myLocationManager.locationServicesAvailable
Copy file name to clipboardExpand all lines: LocationUpdatesBackgroundKotlin/app/src/main/java/com/google/android/gms/location/sample/locationupdatesbackgroundkotlin/data/MyLocationManager.kt
+45-16Lines changed: 45 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -38,14 +38,23 @@ private const val TAG = "MyLocationManager"
Copy file name to clipboardExpand all lines: LocationUpdatesBackgroundKotlin/app/src/main/java/com/google/android/gms/location/sample/locationupdatesbackgroundkotlin/ui/LocationUpdateFragment.kt
Copy file name to clipboardExpand all lines: LocationUpdatesBackgroundKotlin/app/src/main/java/com/google/android/gms/location/sample/locationupdatesbackgroundkotlin/viewmodels/LocationUpdateViewModel.kt
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,8 @@ class LocationUpdateViewModel(application: Application) : AndroidViewModel(appli
34
34
35
35
val receivingLocationUpdates:LiveData<Boolean> = locationRepository.receivingLocationUpdates
36
36
37
+
val locationServicesAvailable:LiveData<Boolean> = locationRepository.locationServicesAvailable
38
+
37
39
val locationListLiveData = locationRepository.getLocations()
0 commit comments