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();
    }
}

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();
    }
}

--- 
+++ 
@@ -8,7 +8,7 @@
 
     @Override
     protected void onPause() {
-        ((RssReaderApplication)getApplicationContext()).persistDataIfModified();
+        ((RssReaderApplication)getApplication()).persistDataIfModified();
         super.onPause();
     }
 }
Use getApplication() to access the Application instance
