package ro.ieval.unical;
+import java.util.ArrayList;
+
import android.content.ContentResolver;
import android.content.Context;
import android.database.Cursor;
}
return events;
}
+
+ public static Event[] getAllEvents(final Context context) {
+ Calendar[] calendars = Calendar.getAllCalendars(context);
+ ArrayList<Event> r = new ArrayList<Event>();
+ for(int i=0; i<calendars.length; ++i) {
+ Event[] e=getEventsByCalendar(context, calendars[i]._id, "");
+ for(int j=0; j<e.length; ++j)
+ r.add(e[j]);
+ }
+ return r.toArray(new Event[r.size()]);
+ }
public void delete(final Context context){
final ContentResolver cr=context.getContentResolver();