Location Labs

  • Company
  • Products
  • Blog
  • Facebook
  • Twitter
  • YouTube
[icon] Universal Location Service

Universal Location Service

  • Overview
  • My Apps
  • Tutorials
  • Test Tools
  • SDK
  • Developer Guide
  • Billing
  • Support
  • Register
  • Sign In

Get the User's Location

Using the Java SDK

  • About the Java SDK
  • Download the Java SDK
  • Configure the Client
  • Prepare a Callback
  • Identify the User
  • Get the User's Location
  • < back to all tutorials

Get the User's Location (back to all tutorials)

Once your application has the identifier of a Veriplace user, your application needs to obtain permission to locate this user.

This tutorial shows how to use the Get Location API to obtain an opt-in by redirecting the user to the Veriplace Privacy Manager.

  1. Step 1: Redirect to Veriplace

    Your application specifies a callback URL and redirects the current user to Veriplace, where they will be prompted to opt-in to your application:

  2. Step 2: Handle callback

    Subsequently, Veriplace redirects the user back to the specified callback URL. As long as you have configured a Servlet to handle this URL, you can check that the current request is a callback and query for the returned location:

    Obtaining a user's location can take up to a few minutes. The Veriplace web framework provides a simple way to show the user an interstitial waiting page while waiting for location.

    If the user does not opt-in to your application, you will get an exception when trying to get the access token.

    If the user's position cannot be determined for some reason, you will get an exception when trying to get location.

    Access tokens for the Get Location API can often be reused; however if you attempt to reuse an access token that has been revoked, you will get an exception when trying to get location.

  3. Step 3: Done

    Congratulations! You're ready to write a Veriplace application.

  • < back to all tutorials

Developers

  • Developer Terms of Service
  • Privacy Policy
  • Content Requirements
  • Trademark Schedule
  • Forum

End Users

  • Terms of Service
  • Privacy Policy
  • Support

Follow Us

  • [icon] Facebook
    Facebook
  • [icon] Twitter
    Twitter
  • [icon] YouTube
    YouTube

Location Labs

info@location-labs.com

© 2010 Location Labs

All rights reserved.