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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:55:26+00:00 2026-05-27T07:55:26+00:00

Hi I’m new to android and I’m developing a reminder that have three categories

  • 0

Hi I’m new to android and I’m developing a reminder that have three categories the first one is to set up multiple appointment reminders and the second one multiple monthly (bills) reminders, and the third one multiple daily (medicine) reminders all in the same project.

All working fine but I’m have a problem when I set the three reminders they all fires on time as it appears on LogCat but the problem is when the medicine notification appears in the bar notification and a bill reminder fires after that, this bill notification will replace the existing medicine reminder on the slide down notification and the vice versa. The appointment reminder notification is working ok.

i need to have the notification for all the three categories in the slide down notification without replacing an existing one with another.

So I think the problem is in the codes of the notification but I couldn’t figure out what’s the problem in my code.

I have separate reminder services for each category. can someone please look at it and tell me what the problem is?

This is the medicine reminder service

public class Medicines_ReminderService extends WakeReminderIntentService {

    public Medicines_ReminderService() {
        super("ReminderService");
            }

    @Override
    void doReminderWork(Intent intent) {
        Log.d("MedicinesReminderService", "Doing work.");
        Long rowId = intent.getExtras().getLong(RemindersDbAdapter.KEY_ROWID_MEDS);

        NotificationManager mgr = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);

        Intent notificationIntent = new Intent(this, MedicinesEdit.class); 
        notificationIntent.putExtra(RemindersDbAdapter.KEY_ROWID_MEDS, rowId); 
        int N_Med_requestCode = rowId.intValue();
        PendingIntent pi = PendingIntent.getActivity(this, N_Med_requestCode, notificationIntent, PendingIntent.FLAG_CANCEL_CURRENT); 



        Notification note=new Notification(android.R.drawable.stat_sys_warning, getString(R.string.notify_new_reminder_message), System.currentTimeMillis());
        note.setLatestEventInfo(this, getString(R.string.notify_new_medicine_reminder_title), getString(R.string.notify_new_reminder_message), pi);
        note.defaults |= Notification.DEFAULT_SOUND; 
        note.flags |= Notification.FLAG_AUTO_CANCEL; 

        int id = (int)((long)rowId);
        mgr.notify(id, note); 


    }
}

And this is the bill reminder service

public class Bills_ReminderService extends WakeReminderIntentService {

    public Bills_ReminderService() {
        super("ReminderService");
            }


    @Override
    void doReminderWork(Intent intent) {
        Log.d("BillsReminderService", "Doing work.");
        Long rowId = intent.getExtras().getLong(RemindersDbAdapter.KEY_ROWID_BILLS);    

        NotificationManager mgr = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);

        Intent notificationIntent = new Intent(this, BillsEdit.class); 
        notificationIntent.putExtra(RemindersDbAdapter.KEY_ROWID_BILLS, rowId); 
        int N_Bill_requestCode = rowId.intValue(); 
        PendingIntent pi = PendingIntent.getActivity(this, N_Bill_requestCode, notificationIntent, PendingIntent.FLAG_CANCEL_CURRENT);  

        Notification note=new Notification(android.R.drawable.stat_sys_warning, getString(R.string.notify_new_reminder_message), System.currentTimeMillis());
        note.setLatestEventInfo(this, getString(R.string.notify_new_bill_reminder_title), getString(R.string.notify_new_reminder_message), pi);
        note.defaults |= Notification.DEFAULT_SOUND; 
        note.flags |= Notification.FLAG_AUTO_CANCEL; 

        int id = (int)((long)rowId);
        mgr.notify(id, note);



    }
}

thanks in advance

best regards,
zoza

  • 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-05-27T07:55:27+00:00Added an answer on May 27, 2026 at 7:55 am

    You are using the row ID as the “unique” identifier when it probably is not unique between the 3 services you have.

    i.e.

        int id = (int)((long)rowId);
        mgr.notify(id, note);
    

    from the docs at http://developer.android.com/guide/topics/ui/notifiers/notifications.html

    Managing your Notifications “The ID uniquely identifies the notification from within your application. The ID is necessary if you need to update the notification or (if your application manages different kinds of notifications) select the appropriate action when the user returns to your application via the intent defined in the notification.”

    If you only need one notification for each category, you could use:

        int BillsID=1;
        int MedsID=2;
    
        mgr.notify(BillsID, note);
        mgr.notify(MedsID, note);
    

    or if you really do need each notification to be based on its row number you need to add a differentiator to avoid the same id being assigned to separate notifications.

        int BillsID=100000;
        int MedsID=200000;
        mgr.notify(BillsID+RowID, note);
        mgr.notify(MedsID+RowID, note);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been developing Android application, and I have one question - ListView uses
I have been developing Android application where I use this code: Date d=new Date(new
I new in the android developing. I want to develop simple application that will
When developing with features introduced with in the new Android OS version, does one
Hi i am new to android i am developing alarm application for that i
I am new to android field. i am developing restaurant menu application, i have
I'm new to android developing but right now I'm working on an application that
I'm new to android developing. I have an activity where I create a thread
I know that eclipse can do this, can Intellij via the new Android support
I am completely new to android, and pretty much a Java newb. I have

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.