Last active
September 6, 2017 05:56
-
-
Save nishantt12/c40a2745c7f9de26180f689b69f2ece4 to your computer and use it in GitHub Desktop.
Receiver
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Receiver for getting location. | |
public class PathSenseReceiver extends PathsenseInVehicleLocationUpdateReceiver { | |
@Override | |
protected void onInVehicleLocationUpdate(Context context, PathsenseInVehicleLocation pathsenseInVehicleLocation) { | |
L.e("onInVehicleLocationUpdate"); | |
EventBus.getDefault().postSticky(pathsenseInVehicleLocation); | |
} | |
} | |
//how I am starting the location update in my main activity. | |
PathsenseLocationProviderApi.getInstance(this).requestInVehicleLocationUpdates(1, PathSenseReceiver.class); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment