UNCCGameDay/src/com/uncc/gameday/activities/Home.java

38 lines
1.0 KiB
Java
Raw Normal View History

package com.uncc.gameday.activities;
import android.content.Context;
2013-10-09 19:39:20 -04:00
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
import android.os.Bundle;
import com.uncc.gameday.R;
import com.uncc.gameday.alerts.AlertFetcher;
public class Home extends MenuActivity {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
Context ctx = getApplicationContext();
2013-10-09 19:39:20 -04:00
this.onFirstRun(ctx);
}
protected void onFirstRun(Context ctx) {
SharedPreferences settings = this.getPreferences(MODE_PRIVATE);
if (settings.getBoolean("FIRST_RUN", true)) {
// First run code
Editor editor = settings.edit();
editor.putBoolean("FIRST_RUN", false);
editor.commit();
}
}
private void getRecentAlerts() {
// Responsible for discovering what the most recent alerts are and showing them.
// Likely should be implemented by querying a local DB of alerts, grabbing recent 20.
2013-10-09 19:39:20 -04:00
}
}