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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T11:49:25+00:00 2026-06-04T11:49:25+00:00

Umm, well im trying to pass an long that is extracted from a calendarview

  • 0

Umm, well im trying to pass an long that is extracted from a calendarview using getDate() method and set it to a long and pass it.. it works for one button i have mutiple buttons in the same interface and for the first button it works fine but for hte send one im having and issue as the data is not being passed :S

 //THis one passes the long without any issues
Create = (Button) findViewById(R.id.CreateApp);
        Create.setOnClickListener(new OnClickListener() {

            public void onClick(View arg0) {
                finish();

                 long date = Present.getDate();
                Intent Crea = new Intent(getApplicationContext(),CreateAppointment.class);
                Crea.putExtra("SelectedDate", date);
                startActivity(Crea);
            }

    });

//code when recieving in another class

Intent g = getIntent();
final long SDate = g.getLongExtra("SelectedDate", 0);


       //THE PROBLEM ONE :S
       Edit = (Button) findViewById(R.id.VEditApp);
       Edit.setOnClickListener(new OnClickListener() {

            public void onClick(View arViewg0) {
                finish();

                 long date = Present.getDate();
                Intent EDT = new Intent(getApplicationContext(),viewedit.class);
                EDT.putExtra("EDTDate", date);
                startActivity(EDT);
            }

    });

// WHat i use to recieve in the other class

Intent EditRecieve = new Intent();
        long Cur_Date = EditRecieve.getLongExtra("EDTDate", 2);

Can someone tell me why i am not getting the value and why the default value is kept on being passed?

  • 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-04T11:49:26+00:00Added an answer on June 4, 2026 at 11:49 am

    In the example that doesn’t work you wrote:

    Intent EditRecieve = new Intent();
    long Cur_Date = EditRecieve.getLongExtra("EDTDate", 2);
    

    But in your first example which did work you wrote:

    Intent g = getIntent();
    final long SDate = g.getLongExtra("SelectedDate", 0);
    

    So looks like a simple typo, replace “new Intent()” with “getIntent()” and you should be good.

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

Sidebar

Related Questions

I have a dataframe in R that I loaded from a CSV file. One
Umm, I've been using Eclipse for Java development and I am trying to use
umm... silly question. I know that one can (and should) use APC cache driver
I've computed the spectogram of an 44100Hz sampled audio signal using 0.025s long Hamming
I'm currently again working on a program from when I was, umm... less capable.
Umm. I though that i would put the contexts, mappings in the ProjectName.Data project
We're currently using the Silverlight VideoSink to capture video from users' local webcams, kinda
If we have the following list: list = ['UMM', 'Uma', ['Ulaster','Ulter']] If I need
My website uses the following code: $a1=1293011062; // hex code umm i think !
There are lots of Why does PHP throw an error here? questions. Well, this

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.