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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:09:18+00:00 2026-05-20T16:09:18+00:00

i am trying to run a cpu intense task every 60 seconds. i am

  • 0

i am trying to run a cpu intense task every 60 seconds. i am using AlarmManager with a PendingIntent, `

    Intent intent = new Intent(MainActivity.this,AlarmReciever.class);
    PendingIntent pi=PendingIntent.getBroadcast(this, 0, intent, 0);
    am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime(), period, pi);

The AlarmReciever.class does some intense processing using some third-party binaries and it takes a minimum of 12 seconds to complete (when the same was tested as a single activity run).
But when I run the same as a PendingIntent, I see that the remote process dies in a few seconds after starting. I get this error

03-03 03:09:45.417: INFO/ActivityManager(109): Start proc com.am:remote for broadcast com.am/.AlarmReciever: pid=7940 uid=10052 gids={1015}

03-03 03:09:55.375: WARN/ActivityManager(109): Timeout of broadcast BroadcastRecord{40a1ee80 null} - receiver=android.os.BinderProxy@4074f798, started 10003ms ago

03-03 03:09:55.375: WARN/ActivityManager(109): Receiver during timeout: ResolveInfo{40ae3380 com.am.AlarmReciever p=0 o=0 m=0x0}

03-03 03:09:56.105: ERROR/ActivityManager(109): ANR in com.am:remote

03-03 03:09:56.105: ERROR/ActivityManager(109): Reason: Broadcast of Intent { flg=0x4 cmp=com.am/.AlarmReciever (has extras) }

03-03 03:09:56.105: ERROR/ActivityManager(109): Load: 1.44 / 1.42 / 1.29

in the Logcat. It says

 Reason: Broadcast of Intent { flg=0x4 cmp=com.am/.AlarmReciever (has extras) }

but I am not placing any extras in the intent. But in future I would wanna place some thing.

Could some one kindly help me understand why it is closing so quickly and what can be done for the process to die only after it finishes its task.

The manifest is listed this way

   <receiver  android:process=":remote" android:name="AlarmReciever"></receiver>

to add on, i have tried the solution provided in this answer on SO but still no luck

  • 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-20T16:09:19+00:00Added an answer on May 20, 2026 at 4:09 pm

    Got the answer myself finally,

    A BroadcastReceiver object is only
    valid for the duration of the call to
    onReceive(Context, Intent). Once your
    code returns from this function, the
    system considers the object to be
    finished and no longer active.

    source: click here

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

Sidebar

Related Questions

I'm using python 2.7, and trying to run some CPU heavy tasks in their
I'm trying to run some commands in paralel, in background, using bash. Here's what
I am trying to run this test, but I am running int a problem.
I'm trying to run tests in parallel using nose. I have setup a nose.cfg
I am trying to run the VS 2008 SP1 installer , but it says
I'm trying to run a batch file, as another user, from my web app.
I'm trying to run some queries to get rid of XSS in our database
I'm trying to run a LINQ to SQL query that returns a result in
I'm trying to run a process and do stuff with its input, output and
I'm trying to run the Tomcat with JBoss Embedded jpa booking example. I run

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.