Skip to content

Instantly share code, notes, and snippets.

public class LocationReceiver extends BroadcastReceiver {
private String TAG = "LocationReceiver";
private LocationResult mLocationResult;
@Override
public void onReceive(Context context, Intent intent) {
if(LocationResult.hasResult(intent)) {
this.mLocationResult = LocationResult.extractResult(intent);
Log.i(TAG, "Location Received: " + this.mLocationResult.toString());
}