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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:20:35+00:00 2026-06-05T08:20:35+00:00

I have a service that shows a notification that I wish that will be

  • 0

I have a service that shows a notification that I wish that will be able to go to a specific activity of my app each time the user presses on it. Usually it would be the last one that the user has shown, but not always.

If the activity was started before, it should return to it, and if not, it should open it inside of the app’s task, adding it to the activities tasks.

In addition, on some cases according to the service’s logic, I wish to change the notification’s intent so that it will target a different activity.

How do i do that? Is it possible without creating a new notification and dismissing the previous one? Is it also possible without creating a new task or an instance of an activity?

  • 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-05T08:20:36+00:00Added an answer on June 5, 2026 at 8:20 am

    No it wouldn’t be possible to change the Activity once you have sent the notification.

    You can start an Activity on your task stack that is not a problem, check out the notification service in the tutorial here:

    http://blog.blundell-apps.com/notification-for-a-user-chosen-time/

    You have to set a pending intent on the notification:

            // The PendingIntent to launch our activity if the user selects this notification
            PendingIntent contentIntent = PendingIntent.getActivity(this, 0, new Intent(this, SecondActivity.class), 0);
    
            // Set the info for the view that shows in the notification panel.
            notification.setLatestEventInfo(this, title, text, contentIntent);
    

    You can see the pending intent takes a normal intent “new Intent(this, SecondActivity.class” so if you want specific behaviour (like bringing to the top instead of starting a new activity. Add the flags like you would normally to this intent. i.e. FLAG_ACTIVITY_REORDER_TO_FRONT (something like that)

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

Sidebar

Related Questions

I have an app that starts a service that continuously updates the notification bar.
I have a service that will return 0 or more sets of data. The
I have on Service that must communicate with an Activity (MyActivity) through a BradcastReceiver.
I have a service that performs background updates. I want to give the user
I have a User Interface that receives asynchronous notifications from a Service that prompts
I have an Activity that starts a Service. In my Activity: startService(new Intent(this, MyService.class));
I have a Windows Service that is always running when the user starts their
I have a service running that updates a notification in the notification bar when
I have an Activity that will query a RESTful API every x seconds (polls
I have created a service which displays a status bar notification after certain time

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.