The following code allow me to keep track of the user location and it works just fine. However everytime I try to set the attribute UpdateInterval with any value higher then 10 seconds a error occurr "Error: invalid transaction id", that makes me wonder. Is there something wrong with my code or it just a limitation from the Location Service API?
Thanks in advance
Romulo Santos
<---- BEGIN --------->
function traceLocation() {
var success = false;
var updateoptions = new Object();
updateoptions.PartialUpdates = false;
updateoptions.UpdateInterval = 9999999; // or less, IT WORKS
updateoptions.UpdateInterval = 10000000; // or more,
var criteria = new Object();
criteria.LocationInformationClass = "GenericLocationInfo" ;
criteria.Updateoptions = updateoptions;
try {
var result = so.ILocation.Trace(criteria, callback);
if(!checkError("ILocation::traceLocation",result)) {
success = true;
I have the same issue. And the only way round I can think of is to use a GetLocation on a loop.
In addition to that, if the phone loose GPS the Trace stops and doesn't come back when the phone picks up GPS again...