Search
Link Search Menu Expand Document
Kony Quantum is now HCL Volt MX. See Revised Terminology. Current Quantum users, see the important note about API naming.

Deprecated Functions

This section lists the deprecated function.

phone.mylocation

This API is deprecated from Volt MX Iris 4.0 release onwards. As an alternate, to capture the location details use the [geolocation.getcurrentposition](voltmx.location_functions.html#getCurrentPosition) API.

This API provides you with the ability to capture the current location of the user based on the Global Positioning System (GPS) and Location Based Services (LBS) capabilities.

Use Case

You can use this API to:

  • pre-populate your current location details in applications like Flight Search or Hotel Search.
  • identify outlets like Shopping Mall, Gas Station, ATM, and so on nearest to your current location.

Syntax

phone.mylocation();

Input Parameters

This API does not require any input parameters.

Return Values

Reference [userdata]

Contains three keys:

cellular ID

longitude

latitude

Status [Number]

Status can be one of the following:

0: Success in finding the location

-1: Unable to find the location

Error Codes

The following error codes are returned:

Error Code Description
101 Network Related Error
102 Location API access is denied by user
103 Unknown location or Location not found
104 Unknown error
105 Location Services Disabled

Implementation Details

To fetch location details on Mobile Web, enable the Requires GPS property of a project and set the CaptureGPS property to true. For more information about capturing location details on Mobile Web, see the appendix GPS Functionality in VoltMX IrisUser Guide.

This API does not fetch data if it is used in the appinit event or on the first call of form.preshow API.

Rules and Restrictions

  • On Mobile Web, this API is available on:
    • iPhone
    • Android
    • other HTML5 browsers.
  • You cannot test this API from Windows Phone Mango emulator as with current release of WP7.0 cellular ID cannot be retrieved.

Platform Availability

  • Available on all platforms except IE8 and prior to IE8 releases.
  • Available on all platforms except prior to IE8 releases.