Created
April 26, 2013 00:05
-
-
Save phpmaps/5464216 to your computer and use it in GitHub Desktop.
Get location providers from a Droid's LocationManager
This file contains 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
LinearLayout providerListLayout = (LinearLayout) findViewById(R.id.providerList); | |
LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); | |
providers = locationManager.getProviders(true); | |
for (String provider : providers) { | |
System.out.println(provider); | |
final TextView row = new TextView(this); | |
row.setText(provider); | |
providerListLayout.addView(row); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment