mirror of
https://github.com/bspeice/UNCCGameDay
synced 2024-11-04 23:28:12 -05:00
Merge branch 'master' of https://github.com/DjBushido/UNCCGameDay.git
Conflicts: res/layout/activity_registration.xml
This commit is contained in:
commit
d49627f3ff
@ -15,10 +15,6 @@
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/AppBaseTheme"
|
||||
android:name="com.uncc.gameday.GameDay" >
|
||||
<activity
|
||||
android:name="com.uncc.gameday.activities.Alerts"
|
||||
android:label="@string/title_activity_alerts" >
|
||||
</activity>
|
||||
<activity
|
||||
android:name="com.uncc.gameday.activities.Parking"
|
||||
android:label="@string/title_activity_parking" >
|
||||
|
@ -1,50 +0,0 @@
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:orientation="vertical"
|
||||
android:paddingBottom="@dimen/activity_vertical_margin"
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin"
|
||||
android:paddingTop="@dimen/activity_vertical_margin">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/alerts_label_alerts_to_receive"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/alerts_label_alerts_to_receive"
|
||||
android:textColor="@color/black" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/alerts_check_timed"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/alerts_check_timed"
|
||||
android:onClick="onClickTimedAlerts"
|
||||
style="@style/GameDayTheme" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/alerts_check_organizations"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/alerts_check_organizations"
|
||||
style="@style/GameDayTheme"
|
||||
android:onClick="onClickOrganizationAlerts" />
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/alerts_check_university"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/alerts_check_university"
|
||||
android:onClick="onClickUniversityAlerts"
|
||||
style="@style/GameDayTheme" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/getAlertsButton"
|
||||
android:layout_width="186dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="left|center_vertical"
|
||||
android:text="@string/button_get_alerts"
|
||||
android:textColor="@color/black"
|
||||
style="@style/GameDayTheme" />
|
||||
|
||||
</LinearLayout>
|
@ -31,43 +31,31 @@
|
||||
|
||||
<requestFocus />
|
||||
|
||||
|
||||
|
||||
<Button
|
||||
android:id="@+id/Button1"
|
||||
android:id="@+id/buttonRegister"
|
||||
style="@style/GameDayTheme"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_marginBottom="15dp"
|
||||
android:gravity="center_horizontal|center_vertical"
|
||||
android:onClick="onClick"
|
||||
android:text="@string/button_register"
|
||||
android:textColor="@color/white"
|
||||
style="?android:attr/buttonStyleSmall"
|
||||
android:background="#488214" />
|
||||
android:textColor="@color/black"
|
||||
android:onClick="onClick"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/editRowNumber"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/Button1"
|
||||
android:layout_alignLeft="@+id/Button1"
|
||||
android:layout_above="@+id/buttonRegister"
|
||||
android:layout_alignLeft="@+id/buttonRegister"
|
||||
android:layout_marginBottom="70dp"
|
||||
android:ems="10"
|
||||
android:inputType="number"
|
||||
android:textColor="@color/white" />
|
||||
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:id="@+id/checkBoxBroadcastInfo"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/Button1"
|
||||
android:layout_alignLeft="@+id/editRowNumber"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:text="@string/check_box_broadcast"
|
||||
android:textColor="@color/white"
|
||||
style="@style/GameDayTheme"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/studentRow"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -8,18 +8,6 @@
|
||||
android:paddingLeft="@dimen/activity_horizontal_margin"
|
||||
android:paddingRight="@dimen/activity_horizontal_margin" >
|
||||
|
||||
<SearchView
|
||||
android:id="@+id/searchView1"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentTop="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_marginTop="18dp"
|
||||
android:background="@color/silver"
|
||||
android:inputType="text"
|
||||
android:queryHint="@string/search_hint" >
|
||||
</SearchView>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/relativeLayout1"
|
||||
android:layout_width="wrap_content"
|
||||
@ -29,37 +17,31 @@
|
||||
android:layout_marginBottom="74dp" >
|
||||
</RelativeLayout>
|
||||
|
||||
<ListView
|
||||
android:id="@+id/RSVPListView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_below="@+id/textView1"
|
||||
android:layout_centerHorizontal="true" >
|
||||
</ListView>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView1"
|
||||
style="@style/GameDayTheme"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/searchView1"
|
||||
android:layout_below="@+id/searchView1"
|
||||
android:layout_marginTop="38dp"
|
||||
android:layout_alignLeft="@+id/RSVPListView"
|
||||
android:layout_alignParentTop="true"
|
||||
android:padding="2dp"
|
||||
android:paddingLeft="20dp"
|
||||
android:text="@string/search_text"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textStyle="italic"
|
||||
android:textColor="@color/white"
|
||||
android:padding="2dp"
|
||||
android:shadowColor="@color/silver"
|
||||
android:shadowDx="3"
|
||||
android:shadowDy="-3"
|
||||
android:shadowRadius="1.5" />
|
||||
|
||||
|
||||
|
||||
<ListView
|
||||
android:id="@+id/RSVPListView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignLeft="@+id/searchView1"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_below="@+id/textView1" >
|
||||
|
||||
</ListView>
|
||||
|
||||
android:shadowRadius="1.5"
|
||||
android:text="@string/search_text"
|
||||
android:textAppearance="?android:attr/textAppearanceLarge"
|
||||
android:textColor="@color/white"
|
||||
android:textStyle="italic" />
|
||||
|
||||
</RelativeLayout>
|
@ -1,11 +1,6 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
|
||||
|
||||
<item android:id="@+id/action_parking" android:title="@string/title_activity_parking" android:icon="@drawable/ic_action_directions" android:orderInCategory="50"></item><item android:id="@+id/action_registration" android:icon="@drawable/ic_action_view_as_list" android:title="@string/title_activity_registration" android:orderInCategory="200"/><item
|
||||
android:id="@+id/action_alert_settings"
|
||||
android:orderInCategory="100"
|
||||
android:showAsAction="ifRoom"
|
||||
android:title="@string/action_alert_settings"
|
||||
android:logo="@drawable/ic_action_settings"/>
|
||||
<item android:id="@+id/action_parking" android:title="@string/title_activity_parking" android:icon="@drawable/ic_action_directions" android:orderInCategory="50"></item><item android:id="@+id/action_registration" android:icon="@drawable/ic_action_view_as_list" android:title="@string/title_activity_registration" android:orderInCategory="200"/>
|
||||
<item android:id="@+id/action_search_rsvp" android:title="@string/title_activity_search_rsvp"></item><item android:id="@+id/action_home" android:title="@string/title_acivity_home" android:orderInCategory="350">
|
||||
</item>
|
||||
|
||||
|
@ -7,12 +7,7 @@
|
||||
<string name="title_activity_parking">Parking</string>
|
||||
<string name="title_activity_registration">Registration</string>
|
||||
<string name="title_acivity_home">Home</string>
|
||||
<string name="title_activity_alerts">Alerts</string>
|
||||
<string name="alerts_label_alerts_to_receive">Select Alerts to Receive:</string>
|
||||
<string name="alerts_check_timed">Timed (Reserve Ticket…)</string>
|
||||
<string name="button_clear_alerts">Clear Alerts</string>
|
||||
<string name="alerts_check_organizations">Organizations</string>
|
||||
<string name="alerts_check_university">University</string>
|
||||
<string name="home_label_recent_alerts">Recent Alerts:</string>
|
||||
<string name="gameday_handle">UNCCGameDay</string>
|
||||
<string name="university_handle">unccharlotte</string>
|
||||
@ -56,7 +51,7 @@
|
||||
<string name="parking_map">Parking Map</string>
|
||||
<string name="zoom_map">Parking Map</string>
|
||||
<string name="search_hint">Enter and Organization/Person:</string>
|
||||
<string name="search_text">Find who else is attending the UNCC football game! \n \nEnter the name of a person or organization into the search bar above.</string>
|
||||
<string name="search_text">Find who else is attending the UNCC football game!</string>
|
||||
<string name="button_refresh_alerts">Refresh Alerts</string>
|
||||
<string name="rate_lot">Rate Lot:</string>
|
||||
<string name="empty_lot">Empty</string>
|
||||
|
@ -1,68 +0,0 @@
|
||||
package com.uncc.gameday.activities;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.uncc.gameday.R;
|
||||
|
||||
// TODO: Auto-generated Javadoc
|
||||
/**
|
||||
* The Class Alerts.
|
||||
*/
|
||||
public class Alerts extends MenuActivity {
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see com.uncc.gameday.activities.MenuActivity#onCreate(android.os.Bundle)
|
||||
*/
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_alerts);
|
||||
}
|
||||
|
||||
/**
|
||||
* On clicking the Timed Alerts box, enable or disable the alerts.
|
||||
*
|
||||
* @param view - The view clicked
|
||||
*/
|
||||
public void onClickTimedAlerts(View view) {
|
||||
int toastDuration = Toast.LENGTH_SHORT;
|
||||
if (((CheckBox) view).isChecked())
|
||||
// Enable Timed alerts
|
||||
Toast.makeText(this, "Timed alerts enabled.", toastDuration).show();
|
||||
else
|
||||
// Disable Timed alerts
|
||||
Toast.makeText(this, "Timed alerts disabled.", toastDuration).show();
|
||||
}
|
||||
|
||||
/**
|
||||
* On clicking the Organization Alerts box, enable or disable the alerts.
|
||||
*
|
||||
* @param view the view
|
||||
*/
|
||||
public void onClickOrganizationAlerts(View view) {
|
||||
int toastDuration = Toast.LENGTH_SHORT;
|
||||
if (((CheckBox) view).isChecked())
|
||||
// Enable Organization alerts
|
||||
Toast.makeText(this, "Organization alerts enabled.", toastDuration).show();
|
||||
else
|
||||
// Disable Organization alerts
|
||||
Toast.makeText(this, "Organization alerts disabled.", toastDuration).show();
|
||||
}
|
||||
|
||||
/**
|
||||
* On clicking the University Alerts box, enable or disable the alerts.
|
||||
*
|
||||
* @param view the view
|
||||
*/
|
||||
public void onClickUniversityAlerts(View view) {
|
||||
int toastDuration = Toast.LENGTH_SHORT;
|
||||
if (((CheckBox) view).isChecked())
|
||||
// Enable University alerts
|
||||
Toast.makeText(this, "University alerts enabled.", toastDuration).show();
|
||||
else
|
||||
// Disable University alerts
|
||||
Toast.makeText(this, "University alerts disabled.", toastDuration).show();
|
||||
}
|
||||
}
|
@ -42,9 +42,6 @@ public class MenuActivity extends Activity {
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()){
|
||||
case R.id.action_alert_settings:
|
||||
startActivity(new Intent(this, Alerts.class));
|
||||
break;
|
||||
case R.id.action_registration:
|
||||
startActivity(new Intent(this, Registration.class));
|
||||
break;
|
||||
|
@ -120,7 +120,11 @@ public class Registration extends MenuActivity {
|
||||
RegistrationClient client = new RegistrationClient(c);
|
||||
client.registerAttendee(a);
|
||||
} catch (RetrofitError e) {
|
||||
Toast.makeText(c, R.string.internet_down_error, Toast.LENGTH_SHORT).show();
|
||||
runOnUiThread(new Thread(){
|
||||
public void run(){
|
||||
Toast.makeText(c, R.string.internet_down_error, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
Log.e("Registration", e.getLocalizedMessage());
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.uncc.gameday.activities;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
@ -19,62 +20,67 @@ import com.uncc.gameday.registration.RegistrationClient;
|
||||
|
||||
public class Search extends MenuActivity {
|
||||
|
||||
List<Attendee> rsvpList;
|
||||
boolean listFetched = false;
|
||||
List<Attendee> rsvpList;
|
||||
boolean listFetched = false;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_search_rsvp);
|
||||
new fetchAttendeesThread(this).start();
|
||||
}
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_search_rsvp);
|
||||
new fetchAttendeesThread(this).start();
|
||||
}
|
||||
|
||||
private class fetchAttendeesThread extends Thread {
|
||||
Context c;
|
||||
public fetchAttendeesThread(Context c) {
|
||||
this.c = c;
|
||||
}
|
||||
private class fetchAttendeesThread extends Thread {
|
||||
Context c;
|
||||
|
||||
public void run() {
|
||||
public fetchAttendeesThread(Context c) {
|
||||
this.c = c;
|
||||
}
|
||||
|
||||
if (Looper.myLooper() == null) {
|
||||
Looper.prepare();
|
||||
}
|
||||
try {
|
||||
RegistrationClient client = new RegistrationClient(this.c);
|
||||
rsvpList = client.listAttendees();
|
||||
listFetched = true;
|
||||
} catch (RetrofitError e) {
|
||||
Toast.makeText(c, R.string.internet_down_error, Toast.LENGTH_SHORT).show();
|
||||
Log.e("Search", e.getLocalizedMessage());
|
||||
}
|
||||
public void run() {
|
||||
|
||||
//sorts RSVPList alphabetically by last name
|
||||
if(rsvpList != null)
|
||||
{
|
||||
Collections.sort(rsvpList, new Comparator<Attendee>() {
|
||||
@Override
|
||||
public int compare(Attendee a1, Attendee a2) {
|
||||
String compareName = a1.getLastName();
|
||||
String thisName = a2.getLastName();
|
||||
return compareName.compareTo(thisName);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (Looper.myLooper() == null) {
|
||||
Looper.prepare();
|
||||
}
|
||||
try {
|
||||
RegistrationClient client = new RegistrationClient(this.c);
|
||||
rsvpList = client.listAttendees();
|
||||
listFetched = true;
|
||||
} catch (RetrofitError e) {
|
||||
runOnUiThread(new Thread(){
|
||||
public void run(){
|
||||
Toast.makeText(c, R.string.internet_down_error,
|
||||
Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ListView listView = (ListView)findViewById(R.id.RSVPListView);
|
||||
ArrayAdapter<Attendee> adapter =
|
||||
new ArrayAdapter<Attendee>(c,android.R.layout.simple_list_item_1, rsvpList);
|
||||
listView.setAdapter(adapter);
|
||||
}
|
||||
});
|
||||
Log.e("Search", e.getMessage());
|
||||
}
|
||||
|
||||
// sorts RSVPList alphabetically by last name
|
||||
if (rsvpList != null) {
|
||||
Collections.sort(rsvpList, new Comparator<Attendee>() {
|
||||
@Override
|
||||
public int compare(Attendee a1, Attendee a2) {
|
||||
String compareName = a1.getLastName();
|
||||
String thisName = a2.getLastName();
|
||||
return compareName.compareTo(thisName);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
rsvpList = new ArrayList<Attendee>();
|
||||
}
|
||||
|
||||
runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ListView listView = (ListView) findViewById(R.id.RSVPListView);
|
||||
ArrayAdapter<Attendee> adapter = new ArrayAdapter<Attendee>(
|
||||
c, android.R.layout.simple_list_item_1, rsvpList);
|
||||
listView.setAdapter(adapter);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -55,7 +55,7 @@ public class LotViewFragment extends DialogFragment {
|
||||
Bundle args = this.getArguments();
|
||||
|
||||
if (args.containsKey("CHOICE"))
|
||||
pc = ParkingChoice.valueOf(String.valueOf((char[])args.get("CHOICE")));
|
||||
pc = ParkingChoice.valueOf(String.valueOf(args.get("CHOICE")));
|
||||
else
|
||||
pc = ParkingChoice.BLACK;
|
||||
|
||||
|
@ -16,125 +16,131 @@ import com.uncc.gameday.twitter.TwitterClient;
|
||||
* The Class AlertFetcher.
|
||||
*/
|
||||
public class AlertFetcher {
|
||||
// Class responsible for fetching all alerts as necessary.
|
||||
// Class responsible for fetching all alerts as necessary.
|
||||
|
||||
/** The max tweets. */
|
||||
private int maxTweets = 5;
|
||||
/** The max tweets. */
|
||||
private int maxTweets = 5;
|
||||
|
||||
/**
|
||||
* Fetch all alerts - Twitter, timed, etc.
|
||||
*
|
||||
* @param ctx the ctx
|
||||
*/
|
||||
public void fetchAlerts(Context ctx) {
|
||||
// Fetch all alerts. Responsible for discovering what sources need to be fetched.
|
||||
try {
|
||||
// Note we have to use the SharedPreferences so that we have preferences no matter what activity
|
||||
// sent us this context
|
||||
SharedPreferences settings = ctx.getSharedPreferences(ctx.getString(R.string.preferences_file), 0); // MODE_PRIVATE
|
||||
/**
|
||||
* Fetch all alerts - Twitter, timed, etc.
|
||||
*
|
||||
* @param ctx
|
||||
* the ctx
|
||||
*/
|
||||
public void fetchAlerts(Context ctx) {
|
||||
// Fetch all alerts. Responsible for discovering what sources need to be
|
||||
// fetched.
|
||||
try {
|
||||
// Note we have to use the SharedPreferences so that we have
|
||||
// preferences no matter what activity
|
||||
// sent us this context
|
||||
SharedPreferences settings = ctx.getSharedPreferences(
|
||||
ctx.getString(R.string.preferences_file), 0); // MODE_PRIVATE
|
||||
|
||||
if (settings.getBoolean("ALERT_ORGANIZATION", false))
|
||||
// Fetch organization alerts
|
||||
this.fetchOrganizationAlerts(ctx);
|
||||
if (settings.getBoolean("ALERT_UNIVERSITY", false))
|
||||
// Fetch university alerts
|
||||
this.fetchUniversityAlerts(ctx);
|
||||
// Fetch organization alerts
|
||||
this.fetchOrganizationAlerts(ctx);
|
||||
// Fetch university alerts
|
||||
this.fetchUniversityAlerts(ctx);
|
||||
// And always fetch alerts made by us. Period.
|
||||
|
||||
// And always fetch alerts made by us. Period.
|
||||
this.fetchGamedayAlerts(ctx);
|
||||
} catch (TwitterException e) {
|
||||
Log.w("AlertFetcher", "Unable to fetch alerts from Twitter...", e);
|
||||
}
|
||||
}
|
||||
this.fetchGamedayAlerts(ctx);
|
||||
} catch (TwitterException e) {
|
||||
Log.w("AlertFetcher", "Unable to fetch alerts from Twitter...", e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fetch all Organization alerts from Twitter
|
||||
*
|
||||
* @param ctx - The Context needed to access the Internet
|
||||
* @throws TwitterException - Error in using the Twitter API
|
||||
*/
|
||||
private void fetchOrganizationAlerts(Context ctx) throws TwitterException {
|
||||
// Process fetching organization alerts (alerts retweeted by us)
|
||||
// Guaranteed to return <= maxTweets
|
||||
String handle = ctx.getString(R.string.gameday_handle);
|
||||
TwitterClient tc = new TwitterClient();
|
||||
List<Status> statuses = tc.fetchTweets(handle, maxTweets);
|
||||
/**
|
||||
* Fetch all Organization alerts from Twitter
|
||||
*
|
||||
* @param ctx
|
||||
* - The Context needed to access the Internet
|
||||
* @throws TwitterException
|
||||
* - Error in using the Twitter API
|
||||
*/
|
||||
private void fetchOrganizationAlerts(Context ctx) throws TwitterException {
|
||||
// Process fetching organization alerts (alerts retweeted by us)
|
||||
// Guaranteed to return <= maxTweets
|
||||
String handle = ctx.getString(R.string.gameday_handle);
|
||||
TwitterClient tc = new TwitterClient();
|
||||
List<Status> statuses = tc.fetchTweets(handle, maxTweets);
|
||||
|
||||
// Filter for anything created by us (retweet)
|
||||
for (Iterator<Status> it = statuses.iterator(); it.hasNext();){
|
||||
// May need to switch to isRetweetByMe, not sure if
|
||||
// We're using the right function (documentation is awful)
|
||||
if (!it.next().isRetweet())
|
||||
it.remove();
|
||||
}
|
||||
// Filter for anything created by us (retweet)
|
||||
for (Iterator<Status> it = statuses.iterator(); it.hasNext();) {
|
||||
// May need to switch to isRetweetByMe, not sure if
|
||||
// We're using the right function (documentation is awful)
|
||||
if (!it.next().isRetweet())
|
||||
it.remove();
|
||||
}
|
||||
|
||||
String type = AlertType.getValue(AlertType.ORGANIZATION);
|
||||
pushToDatabase(statuses, type, ctx);
|
||||
String type = AlertType.getValue(AlertType.ORGANIZATION);
|
||||
pushToDatabase(statuses, type, ctx);
|
||||
|
||||
// List contains all valid alerts now
|
||||
}
|
||||
|
||||
// List contains all valid alerts now
|
||||
}
|
||||
/**
|
||||
* Fetch alerts from the University Twitter
|
||||
*
|
||||
* @param ctx
|
||||
* - The Context for accessing the Internet
|
||||
* @throws TwitterException
|
||||
* - Throws an exception for misuse of Twitter API
|
||||
*/
|
||||
private void fetchUniversityAlerts(Context ctx) throws TwitterException {
|
||||
// Process fetching university alerts
|
||||
// Guaranteed to get `maxTweets` tweets
|
||||
|
||||
/**
|
||||
* Fetch alerts from the University Twitter
|
||||
*
|
||||
* @param ctx - The Context for accessing the Internet
|
||||
* @throws TwitterException - Throws an exception for misuse of Twitter API
|
||||
*/
|
||||
private void fetchUniversityAlerts(Context ctx) throws TwitterException {
|
||||
// Process fetching university alerts
|
||||
// Guaranteed to get `maxTweets` tweets
|
||||
String handle = ctx.getString(R.string.university_handle);
|
||||
TwitterClient tc = new TwitterClient();
|
||||
List<Status> statuses = tc.fetchTweets(handle, maxTweets);
|
||||
|
||||
String handle = ctx.getString(R.string.university_handle);
|
||||
TwitterClient tc = new TwitterClient();
|
||||
List<Status> statuses = tc.fetchTweets(handle, maxTweets);
|
||||
String type = AlertType.getValue(AlertType.UNIVERSITY);
|
||||
pushToDatabase(statuses, type, ctx);
|
||||
}
|
||||
|
||||
String type = AlertType.getValue(AlertType.UNIVERSITY);
|
||||
pushToDatabase(statuses, type, ctx);
|
||||
}
|
||||
/**
|
||||
* Fetch gameday alerts.
|
||||
*
|
||||
* @param ctx
|
||||
* the ctx
|
||||
* @throws TwitterException
|
||||
* the twitter exception
|
||||
*/
|
||||
private void fetchGamedayAlerts(Context ctx) throws TwitterException {
|
||||
// Process fetching alerts generated by staff of UNCCGameDay
|
||||
// Not guaranteed to get `maxTweets` tweets
|
||||
|
||||
/**
|
||||
* Fetch gameday alerts.
|
||||
*
|
||||
* @param ctx the ctx
|
||||
* @throws TwitterException the twitter exception
|
||||
*/
|
||||
private void fetchGamedayAlerts(Context ctx) throws TwitterException {
|
||||
// Process fetching alerts generated by staff of UNCCGameDay
|
||||
// Not guaranteed to get `maxTweets` tweets
|
||||
String handle = ctx.getString(R.string.gameday_handle);
|
||||
TwitterClient tc = new TwitterClient();
|
||||
List<Status> statuses = tc.fetchTweets(handle, maxTweets);
|
||||
|
||||
String handle = ctx.getString(R.string.gameday_handle);
|
||||
TwitterClient tc = new TwitterClient();
|
||||
List<Status> statuses = tc.fetchTweets(handle, maxTweets);
|
||||
// Filter out anything not from us
|
||||
for (Iterator<Status> it = statuses.iterator(); it.hasNext();) {
|
||||
// May need to switch to isRetweetByMe (documentation is awful)
|
||||
if (it.next().isRetweet())
|
||||
it.remove();
|
||||
}
|
||||
|
||||
// Filter out anything not from us
|
||||
for (Iterator<Status> it = statuses.iterator(); it.hasNext();){
|
||||
// May need to switch to isRetweetByMe (documentation is awful)
|
||||
if (it.next().isRetweet())
|
||||
it.remove();
|
||||
}
|
||||
String type = AlertType.getValue(AlertType.GAMEDAY);
|
||||
pushToDatabase(statuses, type, ctx);
|
||||
|
||||
String type = AlertType.getValue(AlertType.GAMEDAY);
|
||||
pushToDatabase(statuses, type, ctx);
|
||||
// List contains all valid alerts now.
|
||||
|
||||
// List contains all valid alerts now.
|
||||
}
|
||||
|
||||
}
|
||||
// takes list of statuses
|
||||
// converts it to Alert object type
|
||||
// and persists to database
|
||||
public void pushToDatabase(List<Status> statuses, String type, Context ctx) {
|
||||
GregorianCalendar todayDate = new GregorianCalendar();
|
||||
long currentDate = todayDate.getTimeInMillis();
|
||||
|
||||
//takes list of statuses
|
||||
//converts it to Alert object type
|
||||
//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);
|
||||
|
||||
AlertDB db = new AlertDB(ctx);
|
||||
|
||||
for(int i = 0; i < statuses.size(); i++)
|
||||
{
|
||||
Alert temp = new Alert(currentDate, statuses.get(i).getText(), 0, type);
|
||||
db.persist(temp);
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < statuses.size(); i++) {
|
||||
Alert temp = new Alert(currentDate, statuses.get(i).getText(), 0,
|
||||
type);
|
||||
db.persist(temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -84,33 +84,66 @@ public class AlertService extends IntentService {
|
||||
|
||||
//VERY dirty code - just for the sake of testing
|
||||
//alert every 30 minutes staring at 9am to 930pm on 12-7-13
|
||||
Alert c1 = new Alert(new GregorianCalendar(2013, 11, 7, 9, 0).getTimeInMillis(), "Auto Alert 9:00a", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c2 = new Alert(new GregorianCalendar(2013, 11, 7, 9, 30).getTimeInMillis(), "Auto Alert 9:30a", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c3 = new Alert(new GregorianCalendar(2013, 11, 7, 10, 0).getTimeInMillis(), "Auto Alert 10:00a", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c4 = new Alert(new GregorianCalendar(2013, 11, 7, 10, 30).getTimeInMillis(), "Auto Alert 10:30a", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c5 = new Alert(new GregorianCalendar(2013, 11, 7, 11, 0).getTimeInMillis(), "Auto Alert 11:00a", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c6 = new Alert(new GregorianCalendar(2013, 11, 7, 11, 30).getTimeInMillis(), "Auto Alert 11:30a", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c7 = new Alert(new GregorianCalendar(2013, 11, 7, 12, 0).getTimeInMillis(), "Auto Alert 12:00p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c8 = new Alert(new GregorianCalendar(2013, 11, 7, 12, 30).getTimeInMillis(), "Auto Alert 12:30p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c9 = new Alert(new GregorianCalendar(2013, 11, 7, 13, 0).getTimeInMillis(), "Auto Alert 1:00p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c10 = new Alert(new GregorianCalendar(2013, 11, 7, 13, 30).getTimeInMillis(), "Auto Alert 1:30p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c11 = new Alert(new GregorianCalendar(2013, 11, 7, 14, 0).getTimeInMillis(), "Auto Alert 2:00p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c12= new Alert(new GregorianCalendar(2013, 11, 7, 14, 30).getTimeInMillis(), "Auto Alert 2:30p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c13 = new Alert(new GregorianCalendar(2013, 11, 7, 15, 0).getTimeInMillis(), "Auto Alert 3:00p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c14 = new Alert(new GregorianCalendar(2013, 11, 7, 15, 30).getTimeInMillis(), "Auto Alert 3:30p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c15 = new Alert(new GregorianCalendar(2013, 11, 7, 16, 0).getTimeInMillis(), "Auto Alert 4:00p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c16 = new Alert(new GregorianCalendar(2013, 11, 7, 16, 30).getTimeInMillis(), "Auto Alert 4:30p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c17 = new Alert(new GregorianCalendar(2013, 11, 7, 17, 0).getTimeInMillis(), "Auto Alert 5:00p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c18 = new Alert(new GregorianCalendar(2013, 11, 7, 17, 30).getTimeInMillis(), "Auto Alert 5:30p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c19 = new Alert(new GregorianCalendar(2013, 11, 7, 18, 0).getTimeInMillis(), "Auto Alert 6:00p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c20 = new Alert(new GregorianCalendar(2013, 11, 7, 18, 30).getTimeInMillis(), "Auto Alert 6:30p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c21 = new Alert(new GregorianCalendar(2013, 11, 7, 19, 0).getTimeInMillis(), "Auto Alert 7:00p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c22 = new Alert(new GregorianCalendar(2013, 11, 7, 19, 30).getTimeInMillis(), "Auto Alert 7:30p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c23 = new Alert(new GregorianCalendar(2013, 11, 7, 20, 0).getTimeInMillis(), "Auto Alert 8:00p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c24 = new Alert(new GregorianCalendar(2013, 11, 7, 20, 30).getTimeInMillis(), "Auto Alert 8:30p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c25 = new Alert(new GregorianCalendar(2013, 11, 7, 21, 0).getTimeInMillis(), "Auto Alert 9:00p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c26 = new Alert(new GregorianCalendar(2013, 11, 7, 21, 30).getTimeInMillis(), "Auto Alert 9:30p", 0, AlertType.getValue(AlertType.TIMED));
|
||||
|
||||
Alert c1 = new Alert(new GregorianCalendar(2013, 11, 9, 10, 0).getTimeInMillis(), "Auto Alert queued for: 10:00am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c2 = new Alert(new GregorianCalendar(2013, 11, 9, 10, 5).getTimeInMillis(), "Auto Alert queued for: 10:05am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c3 = new Alert(new GregorianCalendar(2013, 11, 9, 10, 10).getTimeInMillis(), "Auto Alert queued for: 10:10am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c4 = new Alert(new GregorianCalendar(2013, 11, 9, 10, 15).getTimeInMillis(), "Auto Alert queued for: 10:15am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c5 = new Alert(new GregorianCalendar(2013, 11, 9, 10, 20).getTimeInMillis(), "Auto Alert queued for: 10:20am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c6 = new Alert(new GregorianCalendar(2013, 11, 9, 10, 25).getTimeInMillis(), "Auto Alert queued for: 10:25am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c7 = new Alert(new GregorianCalendar(2013, 11, 9, 10, 30).getTimeInMillis(), "Auto Alert queued for: 10:30am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c8 = new Alert(new GregorianCalendar(2013, 11, 9, 10, 35).getTimeInMillis(), "Auto Alert queued for: 10:40am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c9 = new Alert(new GregorianCalendar(2013, 11, 9, 10, 40).getTimeInMillis(), "Auto Alert queued for: 10:45am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c10 = new Alert(new GregorianCalendar(2013, 11, 9, 10, 45).getTimeInMillis(), "Auto Alert queued for: 10:50am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c11 = new Alert(new GregorianCalendar(2013, 11, 9, 10, 50).getTimeInMillis(), "Auto Alert queued for: 10:55am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c12 = new Alert(new GregorianCalendar(2013, 11, 9, 10, 55).getTimeInMillis(), "Auto Alert queued for: 11:00am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c13 = new Alert(new GregorianCalendar(2013, 11, 9, 11, 0).getTimeInMillis(), "Auto Alert queued for: 11:05am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c14 = new Alert(new GregorianCalendar(2013, 11, 9, 11, 10).getTimeInMillis(), "Auto Alert queued for: 11:10am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c15 = new Alert(new GregorianCalendar(2013, 11, 9, 11, 15).getTimeInMillis(), "Auto Alert queued for: 11:15am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c16 = new Alert(new GregorianCalendar(2013, 11, 9, 11, 20).getTimeInMillis(), "Auto Alert queued for: 11:20am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c17 = new Alert(new GregorianCalendar(2013, 11, 9, 11, 25).getTimeInMillis(), "Auto Alert queued for: 11:25am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c18 = new Alert(new GregorianCalendar(2013, 11, 9, 11, 30).getTimeInMillis(), "Auto Alert queued for: 11:30pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c19 = new Alert(new GregorianCalendar(2013, 11, 9, 11, 35).getTimeInMillis(), "Auto Alert queued for: 11:35am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c20 = new Alert(new GregorianCalendar(2013, 11, 9, 11, 40).getTimeInMillis(), "Auto Alert queued for: 11:40am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c21 = new Alert(new GregorianCalendar(2013, 11, 9, 11, 45).getTimeInMillis(), "Auto Alert queued for: 11:45am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c22 = new Alert(new GregorianCalendar(2013, 11, 9, 11, 50).getTimeInMillis(), "Auto Alert queued for: 11:50am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c23 = new Alert(new GregorianCalendar(2013, 11, 9, 11, 55).getTimeInMillis(), "Auto Alert queued for: 11:55am", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c24 = new Alert(new GregorianCalendar(2013, 11, 9, 12, 0).getTimeInMillis(), "Auto Alert queued for: 12:00pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c25 = new Alert(new GregorianCalendar(2013, 11, 9, 12, 5).getTimeInMillis(), "Auto Alert queued for: 12:05pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c26 = new Alert(new GregorianCalendar(2013, 11, 9, 12, 10).getTimeInMillis(), "Auto Alert queued for: 12:10pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c27 = new Alert(new GregorianCalendar(2013, 11, 9, 12, 15).getTimeInMillis(), "Auto Alert queued for: 12:15pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c28 = new Alert(new GregorianCalendar(2013, 11, 9, 12, 20).getTimeInMillis(), "Auto Alert queued for: 12:20pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c29 = new Alert(new GregorianCalendar(2013, 11, 9, 12, 25).getTimeInMillis(), "Auto Alert queued for: 12:25pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c30 = new Alert(new GregorianCalendar(2013, 11, 9, 12, 30).getTimeInMillis(), "Auto Alert queued for: 12:30pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c31 = new Alert(new GregorianCalendar(2013, 11, 9, 12, 35).getTimeInMillis(), "Auto Alert queued for: 12:35pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c32 = new Alert(new GregorianCalendar(2013, 11, 9, 12, 40).getTimeInMillis(), "Auto Alert queued for: 12:40pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c33 = new Alert(new GregorianCalendar(2013, 11, 9, 12, 45).getTimeInMillis(), "Auto Alert queued for: 12:45pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c34 = new Alert(new GregorianCalendar(2013, 11, 9, 12, 50).getTimeInMillis(), "Auto Alert queued for: 12:50pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c35 = new Alert(new GregorianCalendar(2013, 11, 9, 12, 55).getTimeInMillis(), "Auto Alert queued for: 12:55pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c36 = new Alert(new GregorianCalendar(2013, 11, 9, 13, 0).getTimeInMillis(), "Auto Alert queued for: 01:00pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c37 = new Alert(new GregorianCalendar(2013, 11, 9, 13, 5).getTimeInMillis(), "Auto Alert queued for: 01:05pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c38 = new Alert(new GregorianCalendar(2013, 11, 9, 13, 10).getTimeInMillis(), "Auto Alert queued for: 01:10pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c39 = new Alert(new GregorianCalendar(2013, 11, 9, 13, 15).getTimeInMillis(), "Auto Alert queued for: 01:15pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c40 = new Alert(new GregorianCalendar(2013, 11, 9, 13, 20).getTimeInMillis(), "Auto Alert queued for: 01:20pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c41 = new Alert(new GregorianCalendar(2013, 11, 9, 13, 25).getTimeInMillis(), "Auto Alert queued for: 01:25pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c42 = new Alert(new GregorianCalendar(2013, 11, 9, 13, 30).getTimeInMillis(), "Auto Alert queued for: 01:30pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c43 = new Alert(new GregorianCalendar(2013, 11, 9, 13, 35).getTimeInMillis(), "Auto Alert queued for: 01:35pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c44 = new Alert(new GregorianCalendar(2013, 11, 9, 13, 40).getTimeInMillis(), "Auto Alert queued for: 01:40pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c45 = new Alert(new GregorianCalendar(2013, 11, 9, 13, 45).getTimeInMillis(), "Auto Alert queued for: 01:45pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c46 = new Alert(new GregorianCalendar(2013, 11, 9, 13, 50).getTimeInMillis(), "Auto Alert queued for: 01:50pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c47 = new Alert(new GregorianCalendar(2013, 11, 9, 13, 55).getTimeInMillis(), "Auto Alert queued for: 01:55pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c48 = new Alert(new GregorianCalendar(2013, 11, 9, 14, 0).getTimeInMillis(), "Auto Alert queued for: 02:00pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c49 = new Alert(new GregorianCalendar(2013, 11, 9, 14, 5).getTimeInMillis(), "Auto Alert queued for: 02:05pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c50 = new Alert(new GregorianCalendar(2013, 11, 9, 14, 10).getTimeInMillis(), "Auto Alert queued for: 02:10pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c51 = new Alert(new GregorianCalendar(2013, 11, 9, 14, 15).getTimeInMillis(), "Auto Alert queued for: 02:15pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c52 = new Alert(new GregorianCalendar(2013, 11, 9, 14, 20).getTimeInMillis(), "Auto Alert queued for: 02:20pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c53 = new Alert(new GregorianCalendar(2013, 11, 9, 14, 25).getTimeInMillis(), "Auto Alert queued for: 02:25pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c54 = new Alert(new GregorianCalendar(2013, 11, 9, 14, 30).getTimeInMillis(), "Auto Alert queued for: 02:30pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c55 = new Alert(new GregorianCalendar(2013, 11, 9, 14, 35).getTimeInMillis(), "Auto Alert queued for: 02:35pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c56 = new Alert(new GregorianCalendar(2013, 11, 9, 14, 40).getTimeInMillis(), "Auto Alert queued for: 02:40pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c57 = new Alert(new GregorianCalendar(2013, 11, 9, 14, 45).getTimeInMillis(), "Auto Alert queued for: 02:45pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c58 = new Alert(new GregorianCalendar(2013, 11, 9, 14, 50).getTimeInMillis(), "Auto Alert queued for: 02:50pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c59 = new Alert(new GregorianCalendar(2013, 11, 9, 14, 55).getTimeInMillis(), "Auto Alert queued for: 02:55pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
Alert c60 = new Alert(new GregorianCalendar(2013, 11, 9, 15, 0).getTimeInMillis(), "Auto Alert queued for: 03:00pm", 0, AlertType.getValue(AlertType.TIMED));
|
||||
|
||||
AlertDB db = new AlertDB(this);
|
||||
|
||||
@ -145,6 +178,40 @@ public class AlertService extends IntentService {
|
||||
db.persist(c24);
|
||||
db.persist(c25);
|
||||
db.persist(c26);
|
||||
db.persist(c27);
|
||||
db.persist(c28);
|
||||
db.persist(c29);
|
||||
db.persist(c30);
|
||||
db.persist(c31);
|
||||
db.persist(c32);
|
||||
db.persist(c33);
|
||||
db.persist(c34);
|
||||
db.persist(c35);
|
||||
db.persist(c36);
|
||||
db.persist(c37);
|
||||
db.persist(c38);
|
||||
db.persist(c39);
|
||||
db.persist(c40);
|
||||
db.persist(c41);
|
||||
db.persist(c42);
|
||||
db.persist(c43);
|
||||
db.persist(c44);
|
||||
db.persist(c45);
|
||||
db.persist(c46);
|
||||
db.persist(c47);
|
||||
db.persist(c48);
|
||||
db.persist(c49);
|
||||
db.persist(c50);
|
||||
db.persist(c51);
|
||||
db.persist(c52);
|
||||
db.persist(c53);
|
||||
db.persist(c54);
|
||||
db.persist(c55);
|
||||
db.persist(c56);
|
||||
db.persist(c57);
|
||||
db.persist(c58);
|
||||
db.persist(c59);
|
||||
db.persist(c60);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user