---
title: "Is there anyway to determine if an Intent passed into a BroadcastReceiver's onReceive is the result of a sticky Boradcast Intent, or if it was just sent?"  
description: "Is there anyway to determine if an Intent passed into a BroadcastReceiver's onReceive is the result of a sticky Boradcast Intent, or if it was just sent?"  
author: "Anonymous User"  
published: 2015-06-15  
updated: 2020-09-18  
canonical: https://www.mindstick.com/interview/2622/is-there-anyway-to-determine-if-an-intent-passed-into-a-broadcastreceiver-s-onreceive-is-the-result-of-a-sticky-boradcast-intent-or-if-it-was-just-sent  
category: "android"  
tags: ["android", "android intent"]  
reading_time: 1 minute  

---

# Is there anyway to determine if an Intent passed into a BroadcastReceiver's onReceive is the result of a sticky Boradcast Intent, or if it was just sent?

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

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/2622/is-there-anyway-to-determine-if-an-intent-passed-into-a-broadcastreceiver-s-onreceive-is-the-result-of-a-sticky-boradcast-intent-or-if-it-was-just-sent

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
