hey jacobs ! I guess it is sometime a problematic issue. I remember i had same issues when i started working with google maps. well i should recommend you tu give static values using DDMS tool and go to 'location controls' section and give manual decimal values while your emulator is running. If you want to try any code with a sample map view then you need to give sample kml file in the 'KML' section.
best of luck ! regards, wahib On 3/20/10, Sven Jacobs <sven.jac...@web.de> wrote: > Hi all, > > I'm trying to access location data in the emulator but always receive null > values :( This is the code: > > final LocationManager locationManager = (LocationManager) getSystemService( > Context.LOCATION_SERVICE ); > > if ( locationManager == null ) { > return; > } > > final Criteria criteria = new Criteria(); > > criteria.setAccuracy( Criteria.ACCURACY_FINE ); > criteria.setBearingRequired( false ); > criteria.setSpeedRequired( false ); > criteria.setAltitudeRequired( false ); > criteria.setPowerRequirement( Criteria.NO_REQUIREMENT ); > > final String provider = locationManager.getBestProvider( criteria, false ); > final Location loc = locationManager.getLastKnownLocation( provider ); > > As described > here<http://developer.android.com/guide/topics/location/index.html> > I've > set a fixed position using the geo command on the telnet console but > getLastKnownLocation() always returns null. My app has the following > permissions set > > ACCESS_MOCK_LOCATION > ACCESS_COARSE_LOCATION > ACCESS_FINE_LOCATION > > Is there anything else that I'm missing? > > Many thanks! > > Regards, > Sven > > -- > 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. > -- Wahib-ul-haq 3rd year Communications Engineering Student, NUST, Pakistan. Microsoft Student Partner follow me on twitter @wahibhaq -- 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.