Skip to content

Commit

Permalink
Track if GPS connection fails and why
Browse files Browse the repository at this point in the history
  • Loading branch information
grzesiek2010 committed Jun 19, 2023
1 parent d6a63e4 commit 92f036c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions location/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ dependencies {
implementation project(':androidshared')
implementation project(':icons')
implementation project(':strings')
implementation project(':analytics')
implementation Dependencies.kotlin_stdlib
implementation Dependencies.androidx_core_ktx
implementation Dependencies.play_services_location
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;

import org.odk.collect.analytics.Analytics;

import timber.log.Timber;

/**
Expand Down Expand Up @@ -196,6 +198,7 @@ public void onConnectionSuspended(int cause) {

@Override
public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
Analytics.log("GoogleFusedLocationClient", "onConnectionFailed", connectionResult.toString());
if (getListener() != null) {
getListener().onClientStartFailure();
}
Expand Down

0 comments on commit 92f036c

Please sign in to comment.