---
title: "What is a Sticky Intent?"  
description: "What is a Sticky Intent?"  
author: "Anonymous User"  
published: 2015-06-15  
updated: 2020-09-18  
canonical: https://www.mindstick.com/interview/2621/what-is-a-sticky-intent  
category: "android"  
tags: ["android", "android intent"]  
reading_time: 2 minutes  

---

# What is a Sticky Intent?

**sendStickyBroadcast()** performs a sendBroadcast (Intent) known as sticky, i.e. 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).\
One example of a sticky broadcast sent via the operating system is ACTION_BATTERY_CHANGED. When you call registerReceiver() for that action -- even with a null BroadcastReceiver -- you get the Intent that was last broadcast for that action. Hence, you can use this to find the state of the battery without necessarily registering for all future state changes in the battery.\

## Answers

### Answer by Anonymous User

**sendStickyBroadcast()** performs a sendBroadcast (Intent) known as sticky, i.e. 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).\
One example of a sticky broadcast sent via the operating system is ACTION_BATTERY_CHANGED. When you call registerReceiver() for that action -- even with a null BroadcastReceiver -- you get the Intent that was last broadcast for that action. Hence, you can use this to find the state of the battery without necessarily registering for all future state changes in the battery.\


---

Original Source: https://www.mindstick.com/interview/2621/what-is-a-sticky-intent

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
