title: onReceive called when it shouldn't
body: <p>some seconds ago I was debugging my widget and I've found that the <code>onReceive</code> method is called even if my widget isn't on the home screen (it listens for <code>WIFI_STATE_CHANGED_ACTION</code> ). Even if the process of my widget isn't running, it will be started and the method called.
  The code in the manifest is the following:</p>
  
  <p>
      </p>
  
  <pre><code>&lt;application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true"&gt;
  
      &lt;receiver android:name="WiFiWidget"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.appwidget.action.APPWIDGET_UPDATE" /&gt;
              &lt;action android:name="android.net.wifi.WIFI_STATE_CHANGED" /&gt;
          &lt;/intent-filter&gt;
  
          &lt;meta-data android:name="android.appwidget.provider" 
                     android:resource="@xml/widget_info" /&gt;
      &lt;/receiver&gt;
  
  &lt;/application&gt;
  </code></pre>
  
  <p>The method <code>onReceive</code> simply calls another method <code>toggleState</code> ( to change the wifi state ) and then updates the widget image ( from off to on image or viceversa ).</p>
  
  <p>Obviously the call of the two methods toggleState and updateWidget ( and so the complete onReceive ) are useless if the widget isn't actually active on the home screen..</p>
  
  <p>So, I want my <code>onReceive</code> called only if my widget is effectively placed on home screen..there's a way to do this? :)</p>
  
  <p>thanks in advance for the answers</p>