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

  • Home
  • SEARCH
  • 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 8369039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:32:39+00:00 2026-06-09T13:32:39+00:00

I am trying to get an alarm or notification to go at a certain

  • 0

I am trying to get an alarm or notification to go at a certain time and date. I want to be able to have multiple alarms for specific dates in an array. I don’t know where to continue off of having my button working:

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    //Button button = (Button)findViewById(R.id.button1);
   // button.setOnClickListener(this);
    final CheckBox checkBox = (CheckBox) findViewById(R.id.checkBox1);
    final Button button = (Button) findViewById(R.id.button1);
    button.setOnClickListener(new View.OnClickListener()
    {
        public void onClick(View v) {

             if (checkBox.isChecked()) {



             }

        }

Thank you in advance for helping me.

  • 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-09T13:32:40+00:00Added an answer on June 9, 2026 at 1:32 pm

    You’re going to want to use the Alarm Manager

    This tutorial is a pretty simple example how to use it.

    Another simple exmaple that breaks it down into the basic steps of

    1. Creating an event
    2. Creating a BroadcastReceiver to handle the event

    EDIT
    To make a notification, modify the broadcast receiver to create a notification when the alarm event is received.

    Android Status Notification Documentation shows pretty well the basic steps to create a notification.

    1. Get a reference to the NotificationManager
    2. Create a notification instance. You can then define an image, text, and time which would just be the current time because the alarm event already defined when to go off
    3. Define the notification content such as message and intent to launch when cliked
    4. Call the notification

    String ns = Context.NOTIFICATION_SERVICE;
    NotificationManager mNotificationManager = (NotificationManager) receiverContext.getSystemService(ns);

    Notification notification = new Notification(R.drawable.notification_icon, "Hello", System.currentTimeMillis());
    
    CharSequence contentTitle = "My notification";  
    CharSequence contentText = "Hello World!";  
    Intent notificationIntent = new Intent(receiverContext, TargetActivity.class);  
    PendingIntent contentIntent = PendingIntent.getActivity(receiverContext, 0, notificationIntent, 0);  
    
    notification.setLatestEventInfo(receiverContext, contentTitle, contentText, contentIntent);  
    
    private static final int notificationID = 1;
    
    mNotificationManager.notify(notificationID, notification);
    

    EDIT 2
    Creating notification at specified time using Alarm Manager

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

Sidebar

Related Questions

I'm trying to get a notification to fire at a specific time. It occurs
I'm trying to set an alarm for a particular date and time but so
i'm trying to access alarm provider to get all enabled alarm information. so i
I am trying to get a reminder/alarm Service` working in my note/todo app. I
I have some Objective-C++ code that I'm trying to get events out of an
I'm trying to enforce a time limit on queries in python MySQLDB. I have
I have been able to get my BroadcastReceiver running with this: <receiver android:name=.AlarmReceiver android:enabled=true
I'm trying to set up an alarm receiver right after booting. Therefore, i have
I am trying get my first simple project in rails to run. I have
I have been trying to get notifications to launch on Android at the correct

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.