use of info.guardianproject.cacheword.CacheWordHandler in project storymaker by StoryMaker.
the class FirstStartActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
// this seems to be getting created after the user has already accepted the EULA
/*
final SharedPreferences prefsEula = getSharedPreferences(Globals.PREFERENCES_EULA, Activity.MODE_PRIVATE);
boolean eulaAccepted = prefsEula.getBoolean(Globals.PREFERENCE_EULA_ACCEPTED, false);
if (eulaAccepted) {
// if the preferences show the EULA was already accepted, do not show the EULA screen again
Intent mainIntent = new Intent(this, HomeActivity.class);
startActivity(mainIntent);
finish();
} else {
// if the preferences show the EULA was not yet accepted, show the EULA screen
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_first_start);
mTosAccepted = false;
mTosButton = (Button) findViewById(R.id.btnTos);
}
*/
super.onCreate(savedInstanceState);
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
int timeout = Integer.parseInt(settings.getString("pcachewordtimeout", BaseActivity.CACHEWORD_TIMEOUT));
mCacheWordHandler = new CacheWordHandler(this, timeout);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.activity_first_start);
mTosAccepted = false;
mTosButton = (Button) findViewById(R.id.btnTos);
}
use of info.guardianproject.cacheword.CacheWordHandler in project storymaker by StoryMaker.
the class ProjectsProvider method onCreate.
@Override
public boolean onCreate() {
// NEW/CACHEWORD
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(getContext().getApplicationContext());
int timeout = Integer.parseInt(settings.getString("pcachewordtimeout", BaseActivity.CACHEWORD_TIMEOUT));
mCacheWordHandler = new CacheWordHandler(getContext(), this, timeout);
mCacheWordHandler.connectToService();
mDBHelper = new StoryMakerDB(mCacheWordHandler, getContext());
return true;
}
Aggregations