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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:56:14+00:00 2026-05-24T22:56:14+00:00

When I run my application for the first time my alarm is started and

  • 0

When I run my application for the first time my alarm is started and it works very well.

Intent intent = new Intent(this, Kill_Task.class);  
PendingIntent pendingIntent = PendingIntent.getBroadcast(
                   this, 0, intent, PendingIntent.FLAG_CANCEL_CURRENT);  

AlarmManager objAlarmManager = 
     (AlarmManager) getSystemService(Context.ALARM_SERVICE);  
objAlarmManager.setRepeating(
     AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), 1000, pendingIntent);

Now my alarm is continuing in background and I have to switch off my phone. When I switch on my phone my alarm background processing does not start.

Why is this?

  • 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-24T22:56:14+00:00Added an answer on May 24, 2026 at 10:56 pm

    1) your alarm repeat every second your defined pending intent object . AlarmManager.setRepeating(...
    2) to cancel/stop your alarm you’ve to invoke objAlarmManager.cancel(pendingIntent); . with a pendingIntent that match your pending intent that you’ve define (same class, same action … except extra data that is not taking into account for comparizon … see IntenFilter to know more about how intent may match another one
    3) then cancel the pending intent itself like pendingIntent.cancel(); to be sure that pending intent is unusable.

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

Sidebar

Related Questions

I developed one swing application but each time you run application new window is
For example, the first time I run an application (or immediately after I clear
I have recently started learning F#, and this is the first time I've ever
I would like to run multiple copies of my application and force the first
I have an application that when it first starts i need it to run
when I call Application.Run() on a form, this command halts the program until the
when i run my application it is the error i get... This application has
First of all this is the first time I am asking a java question
when i run my application its get my location(Lat,logi) both new and old location.But
I need to present a wizard once, the first time my windows forms application

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.