-
Titanium Studio Using the Geolocation
Getting Location Information There are two ways to get location information: 1)Make a one-time request with getCurrentPosition. 2)Register to receive location updates by adding an event listener for the location event. Get the Geolocation with event listener Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_BEST; Ti.Geolocation.preferredProvider = Ti.…
-
Memory Leaks In Titanium apps
Solution 1.Remove all the remove all not necessary event listener. 2.Remove all the SetInterval Function. Method for using Geolocation location Event Listener function LocationClass(parent) { this.Parent = parent; var thisClass = this; //Geolocation Setup Ti.Geolocation.accuracy = Ti.Geolocation.ACCURACY_HIGH; Ti.Geolocation.distanceFilter = 10; Ti.Geolocation.preferredProvider = Ti.…