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

  • SEARCH
  • Home
  • 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 8069377
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:00:04+00:00 2026-06-05T13:00:04+00:00

I am writing a code that displays all events of all calendars synced with

  • 0

I am writing a code that displays all events of all calendars synced with a particular Gmail account.But I am able to get data from primary calendar only . Can someone help in how to do it for secondary calendars?

  • 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-06-05T13:00:06+00:00Added an answer on June 5, 2026 at 1:00 pm

    HERE IS THE CODE FOR GETTING ALL EVENTS :

    Uri l_eventUri; 
    l_eventUri = Uri.parse("content://com.android.calendar/events");
    
        Cursor l_managedCursor = null;  
         l_managedCursor = this.managedQuery(l_eventUri, null,null, null, null);
    
    
         l_managedCursor.moveToFirst();
        Log.v("TOTAL NUMBER OF EVENTS :",l_managedCursor.getCount()+"");
    
     for(int i=0;i<l_managedCursor.getCount();i++){
    for(int j=0;j<l_managedCursor.getColumnCount();j++){
    
        Log.d(l_managedCursor.getColumnName(j)+"===>",""+l_managedCursor.getString(j));
    }
    
    l_managedCursor.moveToNext();
    

    }

    *The most important thing is to sync the gmail calendar in your device In ICS we are given with a choice that whether we want to sync secondary calendars or not. Make sure that secondary calendars are synced in your device.Only then we can get the events from the secondary calendars.
    In Android Gingerbread byDefault all the calendars are Synced when we choose accounts&sync whereas in ICS only the selected ones are synced***

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

Sidebar

Related Questions

I am a very proficient C# developer, but need to start writing code that
I'm writing a code that uses bitboards. since iterating on all bits of a
I have a bit of code that basically displays the last x (variable, but
I'm writing an app that takes images from a server and displays all the
I am writing a program to communicate over the serial port. All data that
I am writing code that will spawn two thread and then wait for them
I am writing code that catches this OutOfMemoryException and throws a new, more intuitive
I'm using c#. In many cases I'm writing code that can benefit from a
I'm writing some code that will take a screenshot of another application, given its'
I am writing some code that will go through a file, edit it as

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.