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
package com.example.android.waitlist; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.support.v7.widget.RecyclerView; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.TextView; |
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
private Location getLastKnownLocation() { | |
// get location from any of the location providers that are available | |
locMan = (LocationManager) getActivity().getSystemService(getActivity().LOCATION_SERVICE); | |
List<String> providers = locMan.getProviders(true); | |
Location bestLocation = null; | |
// check for all providers | |
for (String provider : providers) { | |
Location l = locMan.getLastKnownLocation(provider); |