Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6205627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:18:29+00:00 2026-05-24T05:18:29+00:00

I am trying to implement finding and selecting events in calendar on Android Application.

  • 0

I am trying to implement finding and selecting events in calendar on Android Application. I believe that, find and select have completely different implementation.

I have scoured the web to no avail. I would appreciate a helping hand.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:18:30+00:00Added an answer on May 24, 2026 at 5:18 am

    manifest

    <uses-permission android:name="android.permission.READ_CALENDAR" />
    

    These examples are for <= 2.1 version;

    first; find out which calendars exist

    Cursor cursor = cr.query(Uri.parse("content://calendar/calendars"), new String[]{ "_id",  "displayname" }, null, null, null);
    cursor.moveToFirst();
    String[] CalNames = new String[cursor.getCount()];
    int[] CalIds = new int[cursor.getCount()];
    for (int i = 0; i < CalNames.length; i++) {
        CalIds[i] = cursor.getInt(0);
        CalNames[i] = cursor.getString(1);
        cursor.moveToNext();
    }
    cursor.close();
    

    Fetching all events, and particular event is done by specifying range
    ContentResolver contentResolver = getContentResolver();

    Uri.Builder builder = Uri.parse(getCalendarUriBase() + "/instances/when").buildUpon();
            long now = new Date().getTime();
            ContentUris.appendId(builder, now - DateUtils.MILLIS_PER_DAY*10000);
            ContentUris.appendId(builder, now + DateUtils.MILLIS_PER_DAY * 10000);
    

    and then let’s say you wish to log events ID from calendar with ID = 1

    Cursor eventCursor = contentResolver.query(builder.build(),
                    new String[] { "event_id"}, "Calendars._id=" + 1,
                    null, "startDay ASC, startMinute ASC"); 
            // For a full list of available columns see http://tinyurl.com/yfbg76w
            while (eventCursor.moveToNext()) {
                String uid2 = eventCursor.getString(0);
                Log.v("eventID : ", uid2);
    
            }
    

    and for some source code check
    Jim Blackler’s Accessing the internal calendar database inside Google Android applications and Android Calendar Events

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a common GWT application that is using (trying to) Rocket-Framework to implement
I'm trying to implement a 6 Degrees-style algorithm, in that I'm trying to find
when trying to implement an Aspect, that is responsible for catching and logging a
i'm trying to implement action bar in 2.3.3 version. As i'm new to android
I am trying to implement an algorithm in SQL (transact sql) and finding it
I'm new to Java and I've been trying to implement an algorithm for finding
I have a great difficulty finding documentation on how to implement internationalization/localization with Apache
My question is related to this other discussion . I'm trying to implement that
hey everybody i am trying to implement code for finding order statistic but i
I am trying to implement hibernate on a legacy database (that still has a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.