This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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: 24

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: 5852
    
    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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Problem in Obtaining Location using GPS
 
It's not a secret anymore!