what is the significance of setFrequency() function in titanium Js v7.5.0

80 views Asked by At

I have been facing an issue regarding Geolocation in iOS/Android app. I am using Titanium Js and have upgraded Ti v7.5.0 to v8.3.1. I checked my legacy code and came to know that this below function

Titanium.Geolocation.setFrequency()

creating a problem. It seems like this function gets deprecated.

this.locationFrequency = 100;

Geolocate.prototype.getCurrentPosition = function(callback){
var self = this;

// initialize the callback
this.locationReceivedCallback = callback;

// Set this so we get updates rapidly
Titanium.Geolocation.setFrequency(this.locationFrequency)

// Register for the actual event
Titanium.Geolocation.addEventListener('location', someCallBackFunc);
};

Now, I need help to understand what actually this Titanium.Geolocation.setFrequency() does. Is there any alternate way to achieve the same in latest version of Ti?

1

There are 1 answers

4
miga On BEST ANSWER