In my effort to develop a small location finder app for HTC Hero with
Android 1.5, I am using the code below that should work on Android
1.6.
My problem is that includes the commandline to find the available GPS
satelittes: List providers;

Eclipse tells me that I have to parameterize List, but not how.
Please, help me to understand List providers and what I can do to get
it working?
Thank you in advance for your help.

protected void onResume() {
        List providers;
        super.onResume();

        locationManager = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
        providers = locationManager.getProviders(true);

            if (!providers.isEmpty()) {
              location = locationManager.getLastKnownLocation((String)
providers
                   .get(0));
               locationManager.requestLocationUpdates((String)
providers.get(0),
                   15000, 1, this);
             }
             GeoPoint p = new GeoPoint((int) (location.getLatitude() *
1E6),
                 (int) (location.getLongitude() * 1E6));
             mc.animateTo(p);
             mc.setZoom(17);
             mapView.setSatellite(true);
             mapView.setStreetView(true);
             mapView.invalidate();

    }

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe from this group, send email to 
android-beginners+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to