Quantcast
Channel: Entries for the tag widgets
Viewing all articles
Browse latest Browse all 15

Widget Samples series - Geolocation

$
0
0

Geolocation sample widget

The latest in our Widget Samples series is the Geolocation sample widget, which demonstrates how to use the JIL geolocation API.

Location-awareness can add a unique dimension to your mobile apps, enabling you to create presence-based services and include geotagging, mapping, and navigation functionality. The JIL geolocation API is easy to use, does exactly what it says, and makes it easy to give your apps that mobile edge. You can use this sample widget as a starting point for own widget projects.

The sample demonstrates:

  • How to make a location request and handle the asynchronous result
  • How to use the returned location data to display a map showing a location marker
  • Handling button input for a simple UI

The screenshots below show the widget running on the Sony Ericsson Xperia X10 mini:

The example uses the Google Static Maps V2 API, which is easy to use and does not require a developer API key. Of course, if you already have a key for a different mapping service you can use that instead.

Read the Code Notes

Like all samples in the series we're also publishing detailed Code Notes which walk through the source files in detail.

You can download the sample and find the Geolocation Code Noteshere.

What's in the download

The download includes:

  • The installable widget package (unsigned)
  • Fully commented source code
  • README.txt

The widget is compatible with the latest Android phones on Vodafone, as well as the new Nokia N8.


Viewing all articles
Browse latest Browse all 15

Trending Articles