how Respond to BroadCast receiver based on Application Running status.?
<p>I have a registered Broad Cast receiver in my app to store USB connected/disconnected state in Shared Preferences. Its working Fine.</p>

<p>Now i wanted to perform a task immediately if USB connected and my application is running. how can i do this? </p>

<p>If my application is not running , i ll perform the task in my first activity based on the Shared Preference value.</p>

<p>Please give some ideas to do this..</p>
