O'Reilly logo

Flash Development for Android Cookbook by Joseph Labrecque

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adjusting the geolocation sensor update interval

While the default geolocation sensor update interval may be just fine for most applications, what if we would like to speed up or slow down this interval for a specific purpose?

How to do it...

We will need to change the geolocation sensor update interval using methods included with the Geolocation class:

  1. First, import the following classes into your project:
    import flash.display.Sprite; import flash.display.Stage; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.GeolocationEvent; import flash.events.TouchEvent; import flash.sensors.Geolocation; import flash.text.TextField; import flash.text.TextFormat; import flash.ui.Multitouch; import flash.ui.MultitouchInputMode; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required