Can't get GPS location on device

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Can't get GPS location on device

Postby mmenaker » Thu Oct 01, 2009 1:31 am

Hi,

I can get the location in the emulator when I send it through the DDMS however I never get a location update on the actual device (I have it enabled and google maps can find the current location).

Here is my code:
lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, new MyLocationListener());

private class MyLocationListener implements LocationListener {
public void onLocationChanged(Location arg) {
loc = arg;
}

public void onProviderDisabled(String provider) {
}

public void onProviderEnabled(String provider) {
}

public void onStatusChanged(String provider, int status, Bundle extras) {
}
}

Here are the permissions I have:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>

Any help would be great!
Thanks,
Mike
mmenaker
Freshman
Freshman
 
Posts: 6
Joined: Thu Jun 04, 2009 11:15 pm

Top

Ive got the same problem

Postby s141797 » Wed Jan 27, 2010 9:56 pm

Hi im stuck with the exact same problem... Its working on the emulator but not on my Nexus one.. Oh yeah! Did you ever find out what was wrong? Im guessing it has something to do with security issues on the device?

Regards Daniel
s141797
Junior Developer
Junior Developer
 
Posts: 13
Joined: Wed Jan 27, 2010 9:43 pm
Location: Norway

Postby naveenballa » Thu Jan 28, 2010 11:02 am

May be it is problem with GPS on your hardware
Check this
Settings->security&Location uncheck the useWireless Networks
Then check it on GoogleMaps applications
if it finds its location the GPS Works fine
naveenballa
Junior Developer
Junior Developer
 
Posts: 13
Joined: Mon Nov 16, 2009 12:53 pm

Hardware problemm

Postby s141797 » Thu Jan 28, 2010 12:42 pm

Sadly it seems to be a hardware problem in my case... :( :( :(
s141797
Junior Developer
Junior Developer
 
Posts: 13
Joined: Wed Jan 27, 2010 9:43 pm
Location: Norway

Re: Hardware problemm

Postby naveenballa » Thu Jan 28, 2010 12:56 pm

s141797 wrote:Sadly it seems to be a hardware problem in my case... :( :( :(


This may be silly but i would like to say

GPS wont detect the location inside the building....
naveenballa
Junior Developer
Junior Developer
 
Posts: 13
Joined: Mon Nov 16, 2009 12:53 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 4 guests