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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T06:08:35+00:00 2026-05-28T06:08:35+00:00

IntentFilter intentFilter = new IntentFilter(test); registerReceiver(mReceiver, intentFilter); I would like to have no filter

  • 0
IntentFilter intentFilter = new IntentFilter("test");
registerReceiver(mReceiver, intentFilter);

I would like to have no filter like registerReceiver(mReceiver, null) but my app crashes as a result of that. Can I have new IntentFiler() as an empty filer?

  • 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-28T06:08:35+00:00Added an answer on May 28, 2026 at 6:08 am

    Because the BroadcastReceiver returns null when there is no match via the criteria from the IntentFilter, it is not possible with the API to accomplish what you hope to accomplish (which I’m assuming is sending any and all Broadcasts to mReceiver).

    You can certainly specify an empty IntentFilter, but this will be pretty useless as registering the receiver won’t cause it to catch any broadcasts (unless they are directly targeted to the receiver, as mentioned by MisterSquonk in the comments). Otherwise you must know exactly which broadcasts you want to catch with your BroadcastReceiver, then specify the criteria in the IntentFilter.

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

Sidebar

Related Questions

I have an intent filter that looks like so: <activity android:name=com.test.Call android:label=@string/makeCall > <intent-filter>
I have a snippet of code that I'm calling from a service: context.registerReceiver(new BroadcastReceiver()
I actually do this when I'm discovering devices: IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND); this.registerReceiver(mDiscovery,
I have an activity that starts a service like that: Intent youtubeIntent = new
I have an activity defined thus: [Activity (Label = MyActivity)] [IntentFilter (new[]{Intent.ActionView}, Categories=new[]{Intent.CategoryDefault, Intent.CategoryBrowsable},
I have a widget running under android and I would like for it to
I am trying to detect when a new App is being installed but only
Is it possible to create an IntentFilter in android that matches ALL intents that
I have an application that uses a file on the SD card, the application
I'm new to Android development. I'm trying to get a simple HelloWorld app going

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.