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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:00:23+00:00 2026-06-15T03:00:23+00:00

i developed an basic notification example and tried to catch which notification clicked. But

  • 0

i developed an basic notification example and tried to catch which notification clicked. But i couldnt.

I put an arraylist my notificaiton and pass it to reciever activity by putting extras, then try to catch but no way !

Are there anyway to catch which one cliked ?

enter image description here

  • 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-15T03:00:24+00:00Added an answer on June 15, 2026 at 3:00 am

    You can pass a Bundle along with PendingIntent to the next Activity.

    Bundle bundle = new Bundle();
    bundle.putString("Any String");
    NotificationManager notifManager = (NotificationManager) this.getSystemService(this.NOTIFICATION_SERVICE);
    int uniqueInteger = //create a unique Integer        
    int icon = R.drawable.ic_launcher;
    NotificationCompat2.Builder mNotification = new NotificationCompat2.Builder(this).setSmallIcon(icon)
                    .setContentTitle(contentTitle).setContentIntent(getPendingIntent(bundle, uniqueInteger));
    
    mNotification.setDefaults(Notification.DEFAULT_LIGHTS | Notification.DEFAULT_SOUND | Notification.DEFAULT_VIBRATE);
    mNotification.setAutoCancel(true);
    notifManager.notify(uniqueInteger, mNotification.build());
    

    and the method getPendingIntent()

    private PendingIntent getPendingIntent(Bunble bundle, int rc) { 
    Intent notificationIntent = new Intent(this, YourNextActivity.class);
    notificationIntent.putExtras(bundle);
    return PendingIntent.getActivity(this, rc, notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);
    }
    

    I am using NotificationCompat2 by Jake Wharton here but the answer does not depend on that.

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

Sidebar

Related Questions

i have developed some applications for blind which makes them to use basic mobile
I have developed my first basic cics application which is an examination system. Now
I have developed a WCF self-hosted service, for which I have two basic security
I've developed a basic CXF JAX-WS web service. Some details of web service, interface:
I developed a basic web page in MVC 2 for learning the framework, and
I have developed a basic Chat application in Java. It consists of a server
I have developed a custom visual basic 6 control and declared a few custom
Last year, my group developed a web service that included basic search functionality. All
I'm developing a custom theme for WordPress. I developed the basic skeleton of the
This might be a basic question but i wanted to ask since i am

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.