Cant get latitude and longitude without internet connection

Put your problem here if it does not fit any of the other categories.

Cant get latitude and longitude without internet connection

Postby sunjava » Tue May 12, 2009 1:25 pm

Hi all,

I am having problem in getting the latitude and longitude on my
phone..

Case:
i created an application that only display the "Toast" that display the latitude and longitude once i
request it to. using the LocationManager.NETWORK_PROVIDER, instead of
gps.

And when I try it on my G1, everything was fine when i am connected to the internet.
but when i disconnect G1 from WiFi, the application cant get the latitude and longitude anymore..
The onLocationChanged() is not
triggered anymore, instead, onStatusChanged() is triggered.. And I get
TEMPORARILY_UNAVAILABLE error..

So what i want to ask is :Is internet connection required to retrieve
the coordinate ONLY?

Note that I dont use any maps or visual representation of my location.
All I do was to get the latitude and longitude.

Or do i need to add any extra stuff?

As for the permission these are the ones I used, even though I doubt
that the INTERNET permission is needed..

android.permission.ACCESS_FINE_LOCATION
android.permission.ACCESS_COARSE_LOCATION
android.permission.INTERNET

Anyone has any thought? Thanks
sunjava
Freshman
Freshman
 
Posts: 2
Joined: Fri Apr 24, 2009 3:27 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 23 guests