How to get the timezone from the latitude and longitude?

by Prayag Pathak » Sat, 07 May 2011 05:15:48 GMT


Sponsored Links
 Hi guys,

I am creating an application in which I need to implement a
functionality in which I will get the latitude and longitude through
GPS on a button click. Now, I want to get the timezone of the place
from the latitude and longitude.

I tried to call webservice, but its not working properly.

It would be great if someone could suggest a solution either by
implementing a web service or without implementing it.

Regards,

Prayag

-- 



Re: How to get the timezone from the latitude and longitude?

by Streets Of Boston » Sat, 07 May 2011 05:25:08 GMT


 Another way of doing it is to just get the phone's default timezone. Note 
that the timezone could be set (incorrectly) by the user.

If this is not possible and you have to use the user's location, just google 
it: "gps timezone". Plenty of info available there.
E.g. i found this in just 1 minute:

 http://www.earthtools.org/timezone/< ;latitude>/<longitude>



-- 


Sponsored Links


Re: How to get the timezone from the latitude and longitude?

by TreKing » Sat, 07 May 2011 05:27:18 GMT


Re: How to get the timezone from the latitude and longitude?

by Prayag Pathak » Sat, 07 May 2011 05:30:39 GMT


 Thanks man,

I actually am trying to implement this web service since long. But it
gave wierd errors. I also tried to implement it using ksoap2 library.
But in vain. It would be great if someone could guide me more on using
ksoap2 or else let me know that earthtools.org provides which kind of
web service(SOAP or REST).

Regards,

Prayag




-- 



Re: How to get the timezone from the latitude and longitude?

by Prayag Pathak » Sat, 07 May 2011 05:47:28 GMT


 Yo thanks guys!

I could figure that out!

Once again thank you very much for the resources!

Regards,

Prayag





-- 



Re: How to get the timezone from the latitude and longitude?

by Streets Of Boston » Sat, 07 May 2011 06:04:32 GMT


 earthtools uses a REST like interface with XML as content.

Maybe you can find more here:
 http://www.programmableweb.com 

-- 



Re: How to get the timezone from the latitude and longitude?

by Prayag Pathak » Thu, 19 May 2011 23:20:14 GMT


 Hey man!!!

Really a great website! Btw, you have got an interesting name! Streets
of Boston! :) haha! kiddin!
But definitely, a great website.

Thanks again!

Regards,

Prayag




-- 



Other Threads

1. Adding a new View causing Force Close

I basically copied an existing view

part of the Java Code:

...
final View MyRideScreen = (View) findViewById(R.id.myride_screen);
final View OwnerScreen = (View) findViewById(R.id.owners_screen);
...

When adding the OwnerScreen the OwnerScreen.setVisibility(VIS/INVIS);
causes a force close
where the MyRideScreen setup the same does not

I have tried several different things in the XML and nothing seems to
fix it, I have basically copied working XML changed the identifiers
and it still fails with a null pointer exception.

here is what the debug stack trace shows me (I changed the
setVisibility to a onClick event so the app didn't force close right
away:

FATAL EXCEPTION: main
java.lang.NullPointerException
at com.android.package.Dashboard$10.onClick(Dashboard.java:221)
at android.view.View.performClick(View.java:2501)
at android.view.View$PerformClick.run(View.java:9107)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3812)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:841)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
at dalvik.system.NativeStart.main(Native Method)

-- 

2. StageFright: why are you not using JavaBeans?

Hello!
Im relatively new to Android, and on the verge of using StageFright.

I am curious to know why StageFright has been designed the way it is in the 
GingerBread release. Why have Google NOT used JavaBeans - it would have been 
so easy to write new codecs and new Media Sinks as JavaBeans, and the 
Framework could have provided a means for any application to have a 
mix-and-match of sources and sinks.

Thanks and BR
Shrikumar

-- 

3. Filesystem Benchmark - SD Card vs Nand

4. receiving a vCard via Bluetooth

5. List View

6. cookie value is null

7. Android Market Certificate Error