package fi.reaktor.android.rssreader;

import android.app.Activity;

import fi.reaktor.android.rssreader.app.RssReaderApplication;

public abstract class RssReaderBaseActivity extends Activity {

    @Override
    protected void onPause() {
        ((RssReaderApplication)getApplicationContext()).persistDataIfModified();
        super.onPause();
    }
}

package fi.reaktor.android.rssreader;

import android.app.Activity;

import fi.reaktor.android.rssreader.app.RssReaderApplication;

public abstract class RssReaderBaseActivity extends Activity {

    @Override
    protected void onPause() {
        ((RssReaderApplication)getApplication()).persistDataIfModified();
        super.onPause();
    }
}

Use getApplication() to access the Application instance
Use getApplication() to access the Application instance
