How do I disable the previous dates in Android custom calendar?

This is a computation problem in a personal Android project I am undertaking. I need to club multiple meetings in different calendar accounts into a minimal set of time slots. How do I do this?

  • The problem description is I have different Calendar accounts on my Android phone. All calendars have appointments, meetings. The below diagram tries to depict the problem. Calendar Account 1(CA1) account meetings at two time periods- 0900 to 1000 & 1600 to 1630 Calendar Account 2(CA2) account meetings at two time periods- 1000 to 11 & 1500 to 1600 Calendar Account 3(CA3) account meetings at two time periods- 0900 to 1000, 1400 to 1500 & 1545 to 1615 The solution requirement is I need club these multiple meeting occurrence, with differing time lines and calendar accounts, into minimal time blocks composing multiple events(as shown by the transparent rectangle covering the times slices). Is there is any optimal solution to this problem.

  • Answer:

    This might not be an optimal solution, but genetic algorithms are something I would look in to. you need a global optimum. The search space is quite large... There might be conventional methods I'm not aware of. Just a suggestion that might be useful complexity should be something like cn, where c is of the order of 1000-2000

Angshuman Ghosh at Quora Visit the source

Was this solution helpful to you?

Other answers

Maybe divide the timeline into half, a meeting can cross the half or two separate meetings in the two separate divisions can occur, decide if the one crossing is needed and proceed recursively in the same way.

Shrey Malik

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.