Skip to content

Commit

Permalink
Fix location not loading issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dewmal committed Mar 25, 2020
1 parent 5dd0bda commit 8fda34c
Show file tree
Hide file tree
Showing 13 changed files with 49 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ class LocationTrackingService : Service() {
// Trigger new location updates at interval
protected fun startLocationUpdates() { // Create the location request to start receiving updates
mLocationRequest = LocationRequest()
mLocationRequest!!.priority = LocationRequest.PRIORITY_HIGH_ACCURACY
mLocationRequest!!.priority = LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY
mLocationRequest!!.smallestDisplacement = 10.0f
mLocationRequest!!.interval = UPDATE_INTERVAL
mLocationRequest!!.fastestInterval = FASTEST_INTERVAL
Expand Down Expand Up @@ -110,7 +110,7 @@ class LocationTrackingService : Service() {

val distanceTo = location.distanceTo(lastLocation);

if (distanceTo > 100) {
if (distanceTo > 50) {
locationDao.insert(locationModel)
}
} else {
Expand Down
1 change: 1 addition & 0 deletions assets/images/add_ic_call_24px.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/ambulance.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/announcement_24px.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/casefinder_24px.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/contactus_24px.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions assets/images/death.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/home_24px.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions assets/images/locateme_24px.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions assets/images/rehabilitation.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8fda34c

Please sign in to comment.