hi,
i am trying out Google API.
I have an error that says "(003) GPS Error: 1016 undefined". When it enters to a Callback function. It does not have any error with using the emulator. However once it is deployed in a real phone, the error prompts. How do go about solving the error?
Thanks!!
function setup()
{
so = device.getServiceObject("Service.Location", "ILocation");
}
function getLocation() {
try {
var updateoptions = new Object();
updateoptions.PartialUpdates = false;
var criteria = new Object();
criteria.LocationInformationClass = "GenericLocationInfo";
criteria.Updateoptions = updateoptions;
var result = so.ILocation.GetLocation(criteria, callbackLocation);
var errCode = result.ErrorCode;
if(errCode) {
alert("(005) GPS Error: " + errCode + " " + result.ErrorMessage);
}
}
catch (e) {
alert ("(004) ::getLocation error: " + e);
}
}
//Callback function
function callbackLocation(transId, eventCode, result)
{
var errCode = result.ErrorCode;
if (errCode) {
alert("(003) GPS Error: " + errCode + " "+result.ErrorMessage);
}
else {
//succuess result
}
}
regards,
lifenlim

Reply With Quote

