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. interconnecting emulator instances

Hi,
i want to communicate between two emulators, i try it through the method
given here...
http://developer.android.com/guide/developing/tools/emulator.html#connecting
i have to redir to many servers(i have many nodes(server) listening on
different ports)..
is there any way to write those redir commands in a file and run them when i
want to redir to that specific server...

-- 

2. Native Browser intent filters

Hello,

There is something I cannot understand in the native browser
application (com.android.browser/.BrowserActivity) intent filters for
the VIEW intent.

Specifically these 2 filters:
(/packages/apps/Browser/AndroidManifest.xml)

            <!-- For these schemes were not particular MIME type has
been
                 supplied, we are a good candidate. -->
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category
android:name="android.intent.category.DEFAULT" />
                <category
android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="http" />
                <data android:scheme="https" />
                <data android:scheme="about" />
                <data android:scheme="javascript" />
            </intent-filter>
            <!--  For these schemes where any of these particular MIME
types
                  have been supplied, we are a good candidate. -->
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category
android:name="android.intent.category.BROWSABLE" />
                <category
android:name="android.intent.category.DEFAULT" />
                <data android:scheme="http" />
                <data android:scheme="https" />
                <data android:scheme="inline" />
                <data android:mimeType="text/html"/>
                <data android:mimeType="text/plain"/>
                <data android:mimeType="application/xhtml+xml"/>
                <data android:mimeType="application/vnd.wap.xhtml+xml"/
            </intent-filter>

Now, it seems to me that the second filter is partially redundant
compared to the first one. Specifically, why to put there these again?
                <data android:scheme="http" />
                <data android:scheme="https" />

A VIEW intent over "http" or "https" with any mime type specified will
be still handled by the first filter. Can anyone please explain me why
that section has been duplicated? Is it just a matter of style or best
practice?

Thank you


-- 

3. Getting information about external applications used by one particular application

4. AudioRecord on HTC Evo or ANdroid 2.2

5. sharedUserId workaround?

6. Installing the SDK, continuing problems

7. APIs available to Flex (AIR)