summaryrefslogtreecommitdiff
path: root/src/de/podfetcher/PodcastApp.java
blob: e4c2f09711f30cd8900ee4ef2e2e82133470ebd2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package de.podfetcher;

import android.app.Application;
import android.util.Log;
import de.podfetcher.asynctask.FeedImageLoader;
import de.podfetcher.feed.FeedManager;

public class PodcastApp extends Application {
    private static final String TAG = "PodcastApp";
    public static final String PREF_NAME = "PodfetcherPrefs";
    
    
	private static PodcastApp singleton;
	
	public static PodcastApp getInstance() {
		return singleton;
	}

	@Override
	public void onCreate() {
		super.onCreate();
		singleton = this;
		
		FeedManager manager = FeedManager.getInstance();
		manager.loadDBData(getApplicationContext());
	}

	@Override
	public void onLowMemory() {
		super.onLowMemory();
		Log.w(TAG, "Received onLowOnMemory warning. Cleaning image cache...");
		FeedImageLoader.getInstance().wipeImageCache();
	}
	
	
	

}