jQuery in Action, 2nd edition*
The moose likes Android and the fly likes Problem in Obtaining Location using GPS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Problem in Obtaining Location using GPS" Watch "Problem in Obtaining Location using GPS" New topic
Author

Problem in Obtaining Location using GPS

Sunni srivastav
Greenhorn

Joined: Feb 15, 2011
Posts: 23

I want to find the location of an android phone using GPS.Currently I am developing using Eclipse IDE and its android plugin.
Came across code to do this GPS code

But when I am trying to execute it does not display the longitude and latitude even after setting it through Geo command as well through DDMS

The Code is as below:


On the emulator, it prints Provider not available which is I guess cause
here location is null...
Please help in fixing this...
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

On the emulator, it prints Provider not available

The emulator doesn't have GPS. You have to run the code on an actual device that has GPS capability.


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in Obtaining Location using GPS