This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Android and the fly likes gps not getting user location Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Mobile » Android
Bookmark "gps not getting user location" Watch "gps not getting user location" New topic
Author

gps not getting user location

amrut sabade
Ranch Hand

Joined: Aug 16, 2010
Posts: 90
Hii everybody i am tring to get the current userlocation(latitude and longitude ) bt onLocationChanged method is not getting called
but other method like public void onProviderDisabled(String provider) please help what can be the problem ?
i have class
Hardik Trivedi
Ranch Hand

Joined: Jan 30, 2010
Posts: 252
You must have GPRS or wifi enabled for this.

Try using NETWORK_PROVIDER.

and you can use getBestProvider(Criteria) method too.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5779
    
    7

Do you have the ACCESS_FINE_LOCATION permission set in your manifest?


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: gps not getting user location
 
Similar Threads
it doesn't shows location details
Problem in Obtaining Location using GPS
it doesn't give me the country name
how to add a google search option
it doesn't change the longitude & latitude