GeoCapabilities is a native extension designed to expose more granular information on whether GPS is enabled or disabled. Geolocation API only tells if access has been denied to location information. The extension tells whether GPS is turned on or not, or if Network-based location has been denied.

The extension  allows a developer to listen for status events from location providers, tell how long it took to get the first GPS fix, and to use the addProximityAlert() method of the Android API to listen for an event when within a certain radius of a given point. GPS status events are dispatched only after an application attempts to use the GPS. GPS status events can also be dispatched when Network location providers (wi-fi and towers) are disabled or enabled. The extension API has methods to stop and start the events, which help prevent battery draining.


var geo:GeoCapabilities;
var airGeo:Geolocation;

if( Geolocation.isSupported && !airGeo ) {
	airGeo = new Geolocation();
	airGeo.addEventListener( GeolocationEvent.UPDATE, _onGPSUpdate );
	airGeo.setRequestedUpdateInterval( 20000 );

	geo = new GeoCapabilities();
	geo.addEventListener( StatusEvent.STATUS, _onStatusEvent );
	geo.addEventListener( ProviderStatusChangeEvent.GPS_STATUS_CHANGED, _onGPSStatusEvent );
	geo.addEventListener( ProviderStatusChangeEvent.NETWORK_STATUS_CHANGED, _onNetworkStatusEvent );
	geo.addEventListener( ProximityAlertEvent.PROXIMITY_ALERT, _onProximityAlert );

function _onStatusEvent( event:StatusEvent ):void {
	trace( 'test received status event ' + event.level );

function _onGPSStatusEvent( event:ProviderStatusChangeEvent ):void {
	if( event.status == GPSStatus.GPS_STARTED || event.status == GPSStatus.GPS_STOPPED ) {

	} else if( event.status == GPSStatus.GPS_FIRST_FIX ) {


function _onNetworkStatusEvent( event:ProviderStatusChangeEvent ):void {
	if( event.status == NetworkStatus.AVAILABLE || event.status == NetworkStatus.ENABLED || 
		event.status == NetworkStatus.OUT_OF_SERVICE || event.status == NetworkStatus.DISABLED ) {

function _onProximityAlert( event:ProximityAlertEvent ):void {

function _onGPSUpdate( event:GeolocationEvent ):void {

Air Native Extension, Android . URL.