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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:59:17+00:00 2026-05-26T19:59:17+00:00

In my application, I have registered a broadcast receiver to receive the system intent

  • 0

In my application, I have registered a broadcast receiver to receive the system intent ACTION_DEVICE_STORAGE_LOW. I was expecting this to be broadcasted whenever the phone had low internal memory. So, I downloaded a few extra apps (my phone has a very small internal memory) which caused the OS to display the notification that the system memory is low. The phone had 10 – 15 MB remaining. However, my broadcast receiver never received that intent. Yet, the system notification stays in the notification bar, and I am not able to browse the internet because of low internal memory.

Should this intent be broadcasted whenever the low internal memory notification is displayed? Or is there some even lower threshold of memory that will send out this broadcast that I haven’t hit yet on my phone? In the documentation it only says "Broadcast Action: A sticky broadcast that indicates low memory condition on the device." Since it doesn’t actually define "low memory condition," I don’t know if I am doing something wrong, or if I simply haven’t hit that condition yet.

Here is the code for my BroadcastReceiver:

public class MemoryBroadcastReceiver extends BroadcastReceiver {

    public void onReceive(Context context, Intent intent) {

        String action = intent.getAction();

        if (action.equals(Intent.ACTION_MEDIA_MOUNTED)) {
            Log.isExternalStorageProblem = false;
            Log.clearNotification(Log.externalMemoryNotificationID);
        }

        if (action.equals(Intent.ACTION_DEVICE_STORAGE_OK)) {
            Log.isInternalStorageLow = false;
            Log.clearNotification(Log.internalMemoryNotificationID);
        }

        if (action.equals(Intent.ACTION_DEVICE_STORAGE_LOW)) {
            Log.isInternalStorageLow = true;
            Log.displayMemoryNotification("Internal Storage Low",
                    "The internal storage is low, Please fix this.",
                    "Please clear cache and/or uninstall apps.", Log.internalMemoryNotificationID);
        }
    }
}

I have a service that initializes the receiver, adds the intent filter and registers it (among other things):

private MemoryBroadcastReceiver memoryBroadcastReciever = new MemoryBroadcastReceiver();

public void registerBroadcastReceiver() {
    IntentFilter filter = new IntentFilter();
    filter.addAction(Intent.ACTION_DEVICE_STORAGE_OK);
    filter.addAction(Intent.ACTION_MEDIA_MOUNTED);
    filter.addAction(Intent.ACTION_DEVICE_STORAGE_LOW);
    filter.addDataScheme("file");
    
    this.getApplicationContext().registerReceiver(memoryBroadcastReciever, filter);
}

    @Override
    public void onCreate() {
        registerBroadcastReceiver();
}
  • 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-26T19:59:18+00:00Added an answer on May 26, 2026 at 7:59 pm

    TL;DR

    As long as the device maker doesn’t change the default settings, the intent will be broadcast when the free memory reaches 10% of the internal device memory.

    Long Version

    I grepped through the Android source code for that intent and I got to a class called DeviceStorageMonitorService

    (located at: frameworks/base/services/java/com/android/server/DeviceStorageMonitorService.java)

    From the javadoc:

    This class implements a service to monitor the amount of disk
    storage space on the device. If the free storage on device is less
    than a tunable threshold value (a secure settings parameter; default
    10%) a low memory notification is displayed to alert the user. If
    the user clicks on the low memory notification the Application
    Manager application gets launched to let the user free storage
    space.

    So there you have it. As long as the device maker doesn’t change that, it will be at 10%.

    Checking out the source code a bit more, the DeviceStorageMonitor sends out a sticky Broadcast: (line 354)

    mContext.sendStickyBroadcast(mStorageLowIntent);
    

    Which means that even after the broadcast is finished you can catch the data by registering a receiver on that intent.

    from Android Developer – Context :

    Perform a sendBroadcast(Intent) that is “sticky,” meaning the Intent
    you are sending stays around after the broadcast is complete, so that
    others can quickly retrieve that data through the return value of
    registerReceiver(BroadcastReceiver, IntentFilter). In all other ways,
    this behaves the same as sendBroadcast(Intent).

    hope this helps.

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

Sidebar

Related Questions

I have this Broadcast receiver registered public class NotifyAlarmBroadcast extends BroadcastReceiver{ public Context context;
I have an broadcast receiver registered in the manifest for intercepting calls, like this:
I have a broadcast receiver (c2dm push receiver). When i receive a push, i
I am developing an application which posts videos to Facebook. I have registered this
If I have an application with only a few event handlers registered (and the
I have an application that runs on a terminal. The terminal is registered on
I have a clickonce application (VS2010, .NET 4). I have registered a file association
I have registered a custom conversion service in a Spring 3 application. It works
I have a IOS application created through phonegap framework. I have registered a particular
Simple question I think, after I have registered a few system-wide hotkeys with RegisterHotKey()

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.