Android query battery stats context issue
<p>So I have a method that queries for the battery stats. I have no issues when I do this using the activity context, but if I used the context from a broadcast receiver I get </p>

<blockquote>
  <p>android.content.ReceiverCallNotAllowedException: IntentReceiver
  components are not allowed to register to receive intents</p>
</blockquote>

<p>If I can't register for a receiver using a broadcastReceiver context, how would i work around this? </p>

<p>Thanks</p>
