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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:48:35+00:00 2026-06-08T08:48:35+00:00

I have a broadcast receiver with an intent filter that specifies a single custom

  • 0

I have a broadcast receiver with an intent filter that specifies a single custom category:

    <receiver
        android:name=".sys.sub.SubServiceManager"
        android:enabled="true"
        android:exported="false" >
        <intent-filter>
            <category android:name="com.example.SUB_SERVICE_STATE" />
        </intent-filter>
    </receiver>

Then there is this code that issues a broadcast using that intent category with custom actions. My problem is the broadcast is never received.

    Intent speed = new Intent();
    speed.addCategory(inst.getString(R.string.subServiceCat));
    speed.setAction("com.example." + SubServiceManager.START_COMMAND + Example.NAME);
    inst.sendBroadcast(speed);

R.string.subServiceCat holds the same string as defined in the intent-filter.

Is there something else I have to do for a custom-category intent filter?

  • 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-08T08:48:37+00:00Added an answer on June 8, 2026 at 8:48 am

    Documentation says:

    To pass this test(Action test ), the action specified in the Intent object must
    match one of the actions listed in the filter. If the object(intent) or the
    filter does not specify an action, the results are as follows:

    • If the filter fails to list any actions, there is nothing for an
      intent to match, so all intents fail the test. No intents can get
      through the filter.
    • On the other hand, an Intent object that doesn’t specify an action
      automatically passes the test — as long as the filter contains at
      least one action.

    You see that your filter does not specify an action,so your intent can not get through the filter.To solve this problem you would to specify an action to your receiver’s filter or do not specify any action to your intent.

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

Sidebar

Related Questions

I have an BroadcastReceiver for handling new or modified applications: <receiver android:name=.PackageHandler > <intent-filter>
So now I have my BroastcastReceiver declared in the manifest file... <receiver android:name=.MyReceiver> <intent-filter>
I registered a receiver that listens to network events: <receiver android:label=NetworkConnection android:name=.ConnectionChangeReceiver > <intent-filter
I have an intent filter that looks like so: <activity android:name=com.test.Call android:label=@string/makeCall > <intent-filter>
I have an broadcast-receiver that looks like the following within an activity named childActivity
I have a Sms Broadcast Receiver class that extends broadcastreceiver to handle incoming sms,
In my application, I have registered a broadcast receiver to receive the system intent
I have 2 different files that need to initiale the same broadcast receiver. I
I have been able to get my BroadcastReceiver running with this: <receiver android:name=.AlarmReceiver android:enabled=true
I have a broadcast receiver that starts a service when the device is finished

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.