// Path: app/src/main/java/com/sampleapp/base/SampleApplication.java
// public class SampleApplication extends Application {
// 
//     private AppComponent mAppComponent;
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         Fabric.with(this, new Crashlytics());
// 
//         //create component
//         mAppComponent = DaggerAppComponent.builder()
//                 .utilsModule(new UtilsModule(this)).build();
// 
//         //configure timber for logging
//         if (BuildConfig.DEBUG) {
//             Timber.plant(new Timber.DebugTree());
//         }
//     }
// 
//     public AppComponent getAppComponent() {
//         return mAppComponent;
//     }
// }


import android.content.Context;
import android.location.Location;
import android.os.Bundle;
import android.support.annotation.NonNull;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.location.LocationListener;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;
import com.sampleapp.R;
import com.sampleapp.base.SampleApplication;
import javax.inject.Inject;
import timber.log.Timber;
package com.sampleapp.utils;





@SuppressWarnings("MissingPermission")
public class LocationTracker implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener {

    private Context context;
    private GoogleApiClient mGoogleApiClient;
    private static int UPDATE_INTERVAL = 0;
    private static int FATEST_INTERVAL = 0;
    private static int DISPLACEMENT = 2000; // 2KM
    private LocationRequest mLocationRequest;
    private Location mLastLocation;
    private onLocationListener listener;

    @Inject
    AppUtils mAppUtils;

    public LocationTracker(Context context) {
        this.context = context;

// Path: app/src/main/java/com/sampleapp/base/SampleApplication.java
// public class SampleApplication extends Application {
// 
//     private AppComponent mAppComponent;
// 
//     @Override
//     public void onCreate() {
//         super.onCreate();
//         Fabric.with(this, new Crashlytics());
// 
//         //create component
//         mAppComponent = DaggerAppComponent.builder()
//                 .utilsModule(new UtilsModule(this)).build();
// 
//         //configure timber for logging
//         if (BuildConfig.DEBUG) {
//             Timber.plant(new Timber.DebugTree());
//         }
//     }
// 
//     public AppComponent getAppComponent() {
//         return mAppComponent;
//     }
// }


// Path: app/src/main/java/com/sampleapp/utils/LocationTracker.java
import android.content.Context;
import android.location.Location;
import android.os.Bundle;
import android.support.annotation.NonNull;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.location.LocationListener;
import com.google.android.gms.location.LocationRequest;
import com.google.android.gms.location.LocationServices;
import com.sampleapp.R;
import com.sampleapp.base.SampleApplication;
import javax.inject.Inject;
import timber.log.Timber;

package com.sampleapp.utils;





@SuppressWarnings("MissingPermission")
public class LocationTracker implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener {

    private Context context;
    private GoogleApiClient mGoogleApiClient;
    private static int UPDATE_INTERVAL = 0;
    private static int FATEST_INTERVAL = 0;
    private static int DISPLACEMENT = 2000; // 2KM
    private LocationRequest mLocationRequest;
    private Location mLastLocation;
    private onLocationListener listener;

    @Inject
    AppUtils mAppUtils;

    public LocationTracker(Context context) {
        this.context = context;

        ((SampleApplication)context).getAppComponent().inject(this);