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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:19:51+00:00 2026-06-17T09:19:51+00:00

Which intent filter should I use in a broadcast receiver when I want that

  • 0

Which intent filter should I use in a broadcast receiver when I want that a service is running every 5 minutes, without the need of a reboot?

  • 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-17T09:19:52+00:00Added an answer on June 17, 2026 at 9:19 am

    An example of using AlarmManager

    set alarm

    private void setAlarm(Context ctx, long timeToRestoreLivesInMillis) {
            int perion = 1000;
            AlarmManager am = (AlarmManager)ctx.getSystemService(Context.ALARM_SERVICE);
    
            Intent i = new Intent(ctx, OnAlarmReceiver.class);
            PendingIntent pi = PendingIntent.getBroadcast(ctx, 0, i, 0);
    
            am.set(AlarmManager.RTC_WAKEUP, period, pi);
    }
    

    and some receiver which will receive an Intent

    public class OnAlarmReceiver extends BroadcastReceiver {
        @Override
        public void onReceive(Context context, Intent intent) {
            // do something
        }
    }
    

    and don’t forget to register receiver in Manifest.xml

    <receiver
        android:name=".utils.OnAlarmReceiver"
        android:enabled="true"
        android:exported="false" >
    </receiver>
    

    read docs for methods explanation, I have worked with it long time ago.

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

Sidebar

Related Questions

I am using an broadcast receiver for Intent.ACTION_BATTERY_CHANGED. Rate at which I receive this
I´m developing a very memory-consuming app and want to use the largeHeap-Tag, which should
I wanted to start a service from a Broadcast reciever which takes android.intent.action.BOOT_COMPLETED. When
i have this IntentService code which run a service once: protected void onHandleIntent(Intent intent)
Is there a way to know which Intent Filter is responsible for launching an
My app has several Activities, including StartActivity which is declared with <intent-filter> <action android:name=android.intent.action.MAIN
I currently have an Android application that has an intent-filter to receive images from
In my application, I have registered a broadcast receiver to receive the system intent
I need some help on camera intent / filter. Below are my questions. What
I've got an activity for which I've defined an intent filter statically in AndroidManifest.xml.

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.