title: Receiving Android GCM Notifications when application is in stopped state
body: <p>on one of our applications that uses GCM, we've been receiving reports that the app stops receiving notifications when the app has been killed. When the app is started again, the notification appear as normal.</p>
  
  <p>After investigation, we found out that this is due to this change on Android 3.1:</p>
  
  <blockquote>
    <p>Note that the system adds FLAG_EXCLUDE_STOPPED_PACKAGES to all broadcast intents. It does this to prevent broadcasts from background services from inadvertently or unnecessarily launching components of stoppped applications. A background service or application can override this behavior by adding the FLAG_INCLUDE_STOPPED_PACKAGES flag to broadcast intents that should be allowed to activate stopped applications.
    (<a href="http://developer.android.com/about/versions/android-3.1.html#launchcontrols">Android 3.1 changes</a>)</p>
  </blockquote>
  
  <p>I inspected the intent that is fired by GCM when a notification has been received, and I noticed that FLAG_EXCLUDE_STOPPED_PACKAGES is indeed set.</p>
  
  <p>This means that all users who run our app on Android 3.1+ will stop receiving notifications once they kill their app, until they restart it themselves. (Pre-Android 3.1 works just fine).</p>
  
  <p>Since the intent is fired by the GCM framework itself, we cannot change the flags that are set on it, and so we're looking for another workaround.</p>
  
  <p>All ideas are appreciated.</p>