futurice / festapp-android

festapp Android client
http://futurice.github.io/festapp-server/
MIT License
12 stars 15 forks source link

Implement better schedule control [easy/medium] #23

Open joelmertanen opened 10 years ago

joelmertanen commented 10 years ago

GigDao has the following:

    static {
        try {
            startOfFriday = DB_DATE_FORMATTER.parse("2013-07-05 06:00");
            startOfSaturday = DB_DATE_FORMATTER.parse("2013-07-06 06:00");
            startOfSunday = DB_DATE_FORMATTER.parse("2013-07-07 06:00");
            endOfSunday = DB_DATE_FORMATTER.parse("2013-07-07 23:00");
        } catch (ParseException e) {
            Log.e(TAG, "Error setting festival day intervals.");
        }
    }

In addition to decided the date in the schedule, these are used to see if the festival has started or ended already. This allows only three day events. A more flexible scheduling system could be used?

wijnbladh commented 10 years ago

Note: Starting and keeping the FestAppService (and thus data fetching) going has been constrained to:

endOfSunday = DB_DATE_FORMATTER.parse("2013-07-07 23:00");

This is another reason why this behaviour needs to be modified, since at the moment the App thinks the festival is long gone, and won't fetch any data from the backend. So:

I. Find a better home for such variables, preferably so that they

a) Are in one place (all the "configuration variables" of the application) b) Can be updated with the data from backend, if possible (maybe open another issue for that)

II. Tie the launching and running of FestAppService to these variables, if it makes sense. I suppose the App should always do one request to the backend, at least when it is started. No need to keep scanning after that if the festival is over.

kazenokage commented 10 years ago

Group 5 overtakes this. (can't be assigned at the moment)

pahuttun commented 10 years ago

Assigned to Robot 5