Further Alert cleanup >AGK

This commit is contained in:
agk512 2013-12-02 03:35:59 -05:00
parent 06f7c7933f
commit ca881b99bd

View File

@ -1,15 +1,10 @@
package com.uncc.gameday.alerts;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.Iterator;
import java.util.List;
import twitter4j.Paging;
import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;
import twitter4j.conf.ConfigurationBuilder;
import android.content.Context;
import android.content.SharedPreferences;
import android.util.Log;
@ -134,12 +129,14 @@ public class AlertFetcher {
//and persists to database
public void pushToDatabase(List<Status> statuses, String type, Context ctx)
{
GregorianCalendar todayDate = new GregorianCalendar();
long currentDate = todayDate.getTimeInMillis();
AlertDB db = new AlertDB(ctx);
Date todayDate = new Date();
todayDate.getTime();
for(int i = 0; i < statuses.size(); i++)
{
Alert temp = new Alert(todayDate, statuses.get(i).getText(), 0, type);
Alert temp = new Alert(currentDate, statuses.get(i).getText(), 0, type);
db.persist(temp);
}
}