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 8878727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:46:59+00:00 2026-06-14T19:46:59+00:00

I am calling the following function to add a Calendar event (taken largely from

  • 0

I am calling the following function to add a Calendar event (taken largely from roman10):

private void addEvent() {
    Intent l_intent = new Intent(Intent.ACTION_EDIT);
    l_intent.setType("vnd.android.cursor.item/event");
    l_intent.putExtra("title", "roman10 calendar tutorial test");
    l_intent.putExtra("description", "This is a simple test for calendar api");
    l_intent.putExtra("eventLocation", "@home");
    l_intent.putExtra("beginTime", System.currentTimeMillis());
    l_intent.putExtra("endTime", System.currentTimeMillis() + 1800*1000);
    l_intent.putExtra("allDay", 0);
    l_intent.putExtra("eventStatus", 1);
    l_intent.putExtra("visibility", 0);
    l_intent.putExtra("transparency", 0);
    l_intent.putExtra("hasAlarm", 1);

    try {
        startActivity(l_intent);
    } catch (Exception e) {
        Toast.makeText(this.getApplicationContext(), "Sorry, no compatible calendar is found!", Toast.LENGTH_LONG).show();
    }
}

After the completion of this intent, I would like to manually refresh my list activity, which simply holds a list of all the user’s events (I want it to instantly reflect the changes). Does anyone know of a way to do this? Is there any particular function which is called upon the completion of this intent that I can modify?

  • 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-14T19:47:00+00:00Added an answer on June 14, 2026 at 7:47 pm

    Your best bet is to use startActivityForResults(Intent, id)

    static private final int CALENDAR_DONE 101;
    startActivityForResults(l_intent, CALENDAR_DONE);
    

    Then add this function to your activity:

    public void onActivityResult(int reqCode, int resultCode, Intent data) {
        super.onActivityResult(reqCode, resultCode, data);
    
        switch (reqCode) {
          case (CALENDAR_DONE) :
            if (resultCode == Activity.RESULT_OK) {
              //Do stuff here
            }       
          break;
        }
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm running matlab on my local machine and I'm calling the following function from
I am getting following error: error: calling a host function(strcpy) from a __device__/__global__ function(doDecompression)
I'm calling this function from a jUnit test case with the following information: //
I have a PHP function that does the following, calling data from a CSV
Using the following JQuery/AJAX function I'm calling a partial view when an option is
Will there be a difference between the following two ways of calling a function
As the following error implies, calling a host function ('rand') is not allowed in
I am calling the following on ToolStripMenu item click : protected void windowNewMenu_Click(object sender,
I get the following error when I call the function add() You have uncommitted
In the following code, Foo::add calls a function via a function object: struct Plus

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.