diff --git a/android-core/src/main/kotlin/com/mparticle/MPLocationListener.java b/android-core/src/main/kotlin/com/mparticle/MPLocationListener.java new file mode 100644 index 000000000..949a7c16d --- /dev/null +++ b/android-core/src/main/kotlin/com/mparticle/MPLocationListener.java @@ -0,0 +1,40 @@ +package com.mparticle; + +import android.location.Location; +import android.location.LocationListener; +import android.os.Bundle; + +/** + * Created by sdozor on 3/9/15. + */ +public final class MPLocationListener implements LocationListener { + private final MParticle mParticle; + + public MPLocationListener(MParticle mParticle) { + this.mParticle = mParticle; + } + + @Override + public void onLocationChanged(Location location) { + if (mParticle != null) { + mParticle.setLocation(location); + } + } + + @Override + public void onStatusChanged(String provider, int status, Bundle extras) { + + } + + @Override + public void onProviderEnabled(String provider) { + + } + + @Override + public void onProviderDisabled(String provider) { + + } + + +}