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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:16:36+00:00 2026-06-11T18:16:36+00:00

I want to get alarm on monday to friday only. my code is here

  • 0

I want to get alarm on monday to friday only.
my code is here

if (chk_weekday.isChecked()) {

                    int day = calNow.get(Calendar.DAY_OF_WEEK);
                    if (day == 2 || day == 3 || day == 4 || day == 5
                            || day == 6) {

                        alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,
                                calSet.getTimeInMillis(), 1 * 60 * 60 * 1000,
                                pendingIntent);

                    }

Have a Idea.

  • 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-11T18:16:38+00:00Added an answer on June 11, 2026 at 6:16 pm

    please try this code. is successfully run in my apps

    if (chk_monday.isChecked()) {
                            forday(2);
                        } else if (chk_tuesday.isChecked()) {
                            forday(3);
                        } else if (chk_wednesday.isChecked()) {
                            forday(4);
                        } else if (chk_thursday.isChecked()) {
                            forday(5);
                        } else if (chk_friday.isChecked()) {
                            forday(6);
                        } else if (chk_sat.isChecked()) {
                            forday(7);
                        } else if (chk_sunday.isChecked()) {
                            forday(1);
                        }
    
    public void forday(int week) {
    
            calSet.set(Calendar.DAY_OF_WEEK, week);
            calSet.set(Calendar.HOUR_OF_DAY, hour);
            calSet.set(Calendar.MINUTE, minuts);
            calSet.set(Calendar.SECOND, 0);
            calSet.set(Calendar.MILLISECOND, 0);
    
            alarmManager.setRepeating(AlarmManager.RTC_WAKEUP,
                    calSet.getTimeInMillis(), 1 * 60 * 60 * 1000, pendingIntent);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to get alert of specific day in week using Alarm manager in
What I want: get a xml from the AppData to use What I code
I want get only the starting html tags. Lets say I have html like
i want an alarm to go off when user checks in a checkbox. Here
i want to set alarm on specific time and specific Date and get Alart
I want to use an alarm to run some code at a certain time.
I want to get the AM/PM values through the timePickerDialog. my code is such,
I want get the time used for a case so I can create an
I want get all of the Geom objects that are related to a certain
I want get as much as possible from Redis + Hiredis + libevent. I'm

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.