Location Without Maps

What if your Activity needs to access location information, but it doesn't include a MapView? When you use a MapView, Android makes everything very easy with MyLocationOverlay, but even if you don't need a map, it isn't difficult to get location information. The code in this section is not part of MJAndroid, but it shows how you would go about getting location information without a map.

Let's look at a very simple, one-Activity application that displays the current location in a TextView.

0 0

Post a comment