Back to project page context-sms.
The source code is released under:
MIT License
If you think the Android project context-sms 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 com.bretblack.wesay; /*from www . j a v a 2s . c o m*/ import android.app.Application; import android.content.res.Configuration; public class GlobalDb extends Application { /** Singleton instance */ private static GlobalDb singleton; /** Instance of the database adapter */ private FavoritesDbAdapter mDbHelper; @Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); } @Override public void onCreate() { super.onCreate(); singleton = this; mDbHelper = new FavoritesDbAdapter(this); } @Override public void onLowMemory() { super.onLowMemory(); } @Override public void onTerminate() { super.onTerminate(); } public GlobalDb getInstance(){ return singleton; } public FavoritesDbAdapter getDbAdapter(){ return mDbHelper; } }