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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T14:19:08+00:00 2026-06-13T14:19:08+00:00

i am trying to pass some data from my notification intent to one of

  • 0

i am trying to pass some data from my notification intent to one of my activities. but somehow the value is not getting populated correctly.

My notification code from where activity is being called –

Long rowId = intent.getExtras().getLong(TasksDBAdapter.KEY_ROWID);                   
         //  Status bar notification Code Goes here. 

         NotificationManager mgr = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
         Intent notificationIntent = new Intent(this, ReminderModificationActivity.class);  
         notificationIntent.putExtra(TasksDBAdapter.KEY_ROWID, rowId);  
         Log.i(TAG,"rowId in doReminderWork" + rowId);
         PendingIntent pi = PendingIntent.getActivity(this, 0, notificationIntent,PendingIntent.FLAG_ONE_SHOT);  

In this code , Log.i value gives correct rowId value but I dont get correct values in ReminderModificationActivity.class. onCreate() of which is having following piece of code –

mRowId = savedInstanceState != null ? savedInstanceState.getLong(TasksDBAdapter.KEY_ROWID) : null ;
        registerButtonListenersAndSetDefaultText();
        Log.i(TAG, "mROwId in onCreate ReminderNotification-->" + getIntent().getExtras().getLong("RowId"));
        //code to check what row id have been passed
        if(getIntent() != null) {                                        
            Bundle extras = getIntent().getExtras();                     
            mRowId = extras != null ? extras.getLong("RowId") : -1;    
            // Do stuff with the row id here
            if(mRowId != -1){
                //code if RowId valid

            }
        }
        Log.i(TAG, "mROwId in onCreate ReminderNotification again-->" + mRowId);

in this code Log.i returns value 0 even if I have sent value 4 from my notification code. please tel me where I am making a mistake. Let me know if any other details are required.

Thanks,
Ray

  • 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-13T14:19:09+00:00Added an answer on June 13, 2026 at 2:19 pm

    Check the key you’re using to get the data out. When you set it, you use a constant variable, but when you get it you use a hard coded string. It’s easy to mess up doing that.

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

Sidebar

Related Questions

I'm trying to pass some data from one activity to a new one but
I am trying to pass some data into my Controller, but I'm getting a
I am trying to use session to pass some data from one page to
I'm trying to use __doPostBack to pass some data from client to server side.
I'm trying to pass some files from one app to another. I communicate the
Trying to figure out a way where I can pass some data/fields from a
I'm trying to get some data from a file, then parse it and pass
I am trying to pass some encrypted data to a flash , but I
I'm trying to send some data from the server to the client, but the
I'm trying to get some data from my database, and then pass it into

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.