I'm querying the calendar data like this:
// Constructor of the class
mCursor = context.getContentResolver().query(CalendarContract.Events.CONTENT_URI, mColumns, null, null, null);
updateEvents();
//contents of updateEvents:
events.clear();
mCursor.moveToFirst();
mLastUpdate = System.currentTimeMillis();
while (!mCursor.isAfterLast())
{
long end = mCursor.getLong(2);
if (end > mLastUpdate)
events.add(new Event(mCursor));
mCursor.moveToNext();
}
The code manages works on mobile device, however when it's run on a Wear device there appears to be no data.
I've found a WaerableCalendarContract
, but it doesn't seem to contain the Events
class that I use to fill the mColumns class to select the desired data.
How can I do the same on the Wear?