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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T22:33:57+00:00 2026-06-07T22:33:57+00:00

I have been able to get my BroadcastReceiver running with this: <receiver android:name=.AlarmReceiver android:enabled=true

  • 0

I have been able to get my BroadcastReceiver running with this:

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

As you can see no <intent-filter>. It gets called correctly with the right Intent extras. But I have been looking around and I am confused as to whether I need one or not? I do have a setAction() method called on my Intents but to make them unique from others to ensure a specific issue with notifications, not actually using that action’s string. But what exactly is the correlation? Thanks in advance.

Intent intent = new Intent(this.getContext(), AlarmReceiver.class);
        intent.setAction("com.something"+System.currentTimeMillis());
        //... extras are here
        PendingIntent pi = PendingIntent.getBroadcast(this.getContext(), 123, intent, PendingIntent.FLAG_CANCEL_CURRENT|Intent.FILL_IN_DATA);
AlarmManager alarm = (AlarmManager)getContext().getSystemService(Activity.ALARM_SERVICE);
        alarm.set(AlarmManager.RTC_WAKEUP, time.getTimeInMillis(), pi);

Using that with what I have in the manifest file works.

EDIT
I found this on the Android Developers blog, and it states this:


Implicit Intents only specify “what” they should match, using actions, categories, data,
MIME types, and so on. The exact components that they will find are only determined at
run-time, by the Package Manager matching it against the current applications.

Explicit Intents specify a single explicit “who” they should match, through a
ComponentName. Regardless of whatever else is in the Intent, it is only associated with
the exact manifest package name and class name as given in its ComponentName.


I am still slightly confused with this explanation, but it seems to be the closest thing to what I should be doing. So I am sure I am using an implicit intent. Question is, is it ok that I am leaving out <intent-filter>? I am matching it to a specific class. There may not be an actual action tying them together, perse, but is the class enough?

  • 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-07T22:33:59+00:00Added an answer on June 7, 2026 at 10:33 pm

    <intent-filter> is required when you want to start your receiver using implicit intents, if you are always using explicit intents to start your broadcast receiver then intent-filters are not required.

    see this SO Post.

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

Sidebar

Related Questions

I've been reading similar questions to this issue and have been able to get
Using udev I have been able to get this information for a certain USB
With the help of this great website I have been able to get about
I have been trying different things and still have been able to get exactly
I have this excel file which I have been able to write the data
I have been able to get the clicked pagination item to respond to a
I'm building an image gallery and have been able to get the clicked thumbnail
I'm working on my first iPhone app and have been able to get most
Finally, I have been able to get through reflection, a member of type Func<T,
I have to create a select box like this. I have been able to

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.