Back to project page EnklawaPlayer.
The source code is released under:
GNU General Public License
If you think the Android project EnklawaPlayer listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package macbury.pod.managers; // w ww .j a va 2 s . co m import android.app.Application; /** * Created by macbury on 09.09.14. */ public class App extends Application { public DatabaseManager db; public ServiceManager services; public IntentManager intents; public SettingsManager settings; public NotificationsManager notifications; public BroadcastsManager broadcasts; public StorageManager storage; public AlarmsManager alarms; private static App current; @Override public void onCreate() { super.onCreate(); this.current = this; this.broadcasts = new BroadcastsManager(this); this.db = new DatabaseManager(this); this.services = new ServiceManager(this); this.intents = new IntentManager(this); this.notifications = new NotificationsManager(this.getApplicationContext()); this.storage = new StorageManager(this); this.settings = new SettingsManager(this); this.alarms = new AlarmsManager(this); this.settings.update(); this.db.episodeFiles.markDownloadingAsFailed(); syncIfFirstBoot(); } private void syncIfFirstBoot() { if (App.current().db.episodes.count() == 0) { services.syncPodService(); } } public static synchronized App current() { return current; } @Override public void onTerminate() { super.onTerminate(); this.db.close(); this.current = null; } }