The Terminal Location service allows applications to query for the location of a particular subscriber. The location is determined using A-GPS (Assisted Global Positioning System).
In general, requests for location can be of two kinds:
- Mobile Originated (MO) : MO requests are generated by applications residing on a subscriber’s mobile phone and request the user's current location.
- Network Initiated (NI): NI requests are generated by location-based applications requesting the subscriber’s location that do not reside on the subscriber’s mobile phone. These are the kind of requests that the Terminal Location service should be used for.
Things to note:
- Applications need to use the SECONDARY application id for AGPS requests.
- These services are meant to be used on the server side so applications should try to make only Network Initiated(NI) requests
- Currently applications can only poll for the location of the terminal. Notification may be part of a future release.
- Also, currently the requests may generate errors with the error message "A service error occurred. Error code is UNR-007: Error calling [ getLocation] in adapter UNR-007". The ADCU team is working on resolving this issue.
Refer to the attached developer's guide for more details.
Note: The code examples provided below use classes that you would need to compile for your application. You will need to download the WSDL (append "?wsdl" to the endpoint URL to download the WSDL) for the relevant service and compile these classes using a library like Apache Axis. Eclipse has a plug-in for Axis which makes things easier.
The code below requests the location for a terminal with a low delay which means that the service should respond within a reasonable time with the location information which may not be as accurate as desired. The more the accuracy desired, the more time the service response will take.