    protected void onHandleIntent( Intent intent ) {
        String action = intent.getAction();
        if ( action.equals( ACTION_GET_AIRSIGMET ) ) {
            String type = intent.getStringExtra( TYPE );
            if ( type.equals( TYPE_TEXT ) ) {
                String stationId = intent.getStringExtra( STATION_ID );
                double[] box = intent.getDoubleArrayExtra( COORDS_BOX );
                int hours = intent.getIntExtra( HOURS_BEFORE, 3 );
                boolean cacheOnly = intent.getBooleanExtra( CACHE_ONLY, false );
                boolean forceRefresh = intent.getBooleanExtra( FORCE_REFRESH, false );
                File xml = getDataFile( "AIRSIGMET_"+stationId+".xml" );
                if ( forceRefresh || ( !cacheOnly && !xml.exists() ) ) {
                    try {
                        String query = String.format( AIRSIGMET_TEXT_QUERY,
                                hours, box[ 0 ], box[ 1 ], box[ 2 ], box[ 3 ] );
                        fetchFromNoaa( query, xml, true );
                    } catch ( Exception e ) {
                        UiUtils.showToast( this, "Unable to fetch AirSigmet: "+e.getMessage() );
                    }
                }
                AirSigmet airSigmet = new AirSigmet();
                if ( xml.exists() ) {
                    mParser.parse( xml, airSigmet );
                }
                sendResultIntent( action, stationId, airSigmet );
            } else if ( type.equals( TYPE_IMAGE ) ) {
                boolean hiRes = getResources().getBoolean( R.bool.WxHiResImages );
                String code = intent.getStringExtra( IMAGE_CODE );
                String imageName = String.format(
                        hiRes? AIRSIGMET_IMAGE_ZOOM_NAME : AIRSIGMET_IMAGE_NAME, code );
                File imageFile = getDataFile( imageName );
                if ( !imageFile.exists() ) {
                    try {
                        String path = hiRes? AIRSIGMET_IMAGE_ZOOM_PATH : AIRSIGMET_IMAGE_PATH;
                        path += imageName;
                        fetchFromNoaa( path, imageFile, false );
                    } catch ( Exception e ) {
                        UiUtils.showToast( this, "Unable to fetch AirSigmet image: "
                                +e.getMessage() );
                    }
                }
                sendResultIntent( action, code, imageFile );
            }
        }
    }

    protected void onHandleIntent( Intent intent ) {
        String action = intent.getAction();
        if ( action.equals( ACTION_GET_AIRSIGMET ) ) {
            String type = intent.getStringExtra( TYPE );
            if ( type.equals( TYPE_TEXT ) ) {
                String stationId = intent.getStringExtra( STATION_ID );
                double[] box = intent.getDoubleArrayExtra( COORDS_BOX );
                int hours = intent.getIntExtra( HOURS_BEFORE, 3 );
                boolean cacheOnly = intent.getBooleanExtra( CACHE_ONLY, false );
                boolean forceRefresh = intent.getBooleanExtra( FORCE_REFRESH, false );
                File xml = getDataFile( "AIRSIGMET_"+stationId+".xml" );
                if ( forceRefresh || ( !cacheOnly && !xml.exists() ) ) {
                    try {
                        String query = String.format( AIRSIGMET_TEXT_QUERY,
                                hours, box[ 0 ], box[ 1 ], box[ 2 ], box[ 3 ] );
                        fetchFromNoaa( query, xml, true );
                    } catch ( Exception e ) {
                        UiUtils.showToast( this, "Unable to fetch AirSigmet: "+e.getMessage() );
                    }
                }
                AirSigmet airSigmet = new AirSigmet();
                if ( xml.exists() ) {
                    mParser.parse( xml, airSigmet );
                }
                sendResultIntent( action, stationId, airSigmet );
            } else if ( type.equals( TYPE_IMAGE ) ) {
                boolean hiRes = getResources().getBoolean( R.bool.WxHiResImages );
                String code = intent.getStringExtra( IMAGE_CODE );
                String imageName = String.format(
                        hiRes? AIRSIGMET_IMAGE_ZOOM_NAME : AIRSIGMET_IMAGE_NAME, code );
                File imageFile = getDataFile( imageName );
                if ( !imageFile.exists() ) {
                    try {
                        String path = hiRes? AIRSIGMET_IMAGE_ZOOM_PATH : AIRSIGMET_IMAGE_PATH;
                        path += imageName;
                        fetchFromNoaa( path, null, imageFile, false );
                    } catch ( Exception e ) {
                        UiUtils.showToast( this, "Unable to fetch AirSigmet image: "
                                +e.getMessage() );
                    }
                }
                sendResultIntent( action, code, imageFile );
            }
        }
    }
