question

AndroidDev avatar image
AndroidDev asked ·

Get current location ZIP code.

Hi,

How can I get current ZIP code of device location?

Take in mind that device can travel and location often changes.

Clover Android SDKclover developer community
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Jeffrey Blattman avatar image
Jeffrey Blattman answered ·

Only some Clover devices have location services (such as Flex) but it's GPS-based only (not AGPS). It's only going to work in locations where the device has a clear view of the sky. Even if you did have the lat / long, you'd need to subscribe to a service that could map that to a zip code.

If you are writing an app here that needs to know this, you could do something like keep a mapping of wifi SSID to zip code, and if it's unknown, ask the user and remember it. Sync this data between devices so once it's known on one device it's known to all. Just an idea.

1 comment Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Clear. Thank you, Jeffrey!

0 Likes 0 · ·

Welcome to the
Clover Developer Community