title: intent.setAction() and intent.getAction() not working in BroadcastReceiver
body: <p>I am using BroadCaastReceiver to allow user perform offline events.The issue is that it is never going inside<code>intent.getAction().equals("beenthereclicked")</code>if i try switching on wifi few seconds after clicking on beenThereView.However it does go inside  <code>if (wifi.isAvailable() || mobile.isAvailable())</code> whenever i switch on wifi.I failed to understand why   <code>intent.setAction()</code> and <code>intent.getAction()</code> not working.I can see <code>wificonnected</code> in my log but can't see <code>beenthereclicked</code> in my log.</p>
  
  <p>i wrote this inside onReceive- <code>Log.e("NetworkChangeReceiver","intent"+intent.getAction());</code> .. then i am getting.. <code>intentandroid.net.conn.CONNECTIVITY_CHANGE</code> in log</p>
  
  <pre><code>        beenThereView.setOnClickListener(new View.OnClickListener() {
                  @Override
                  public void onClick(View view) {
                      Intent intent = new Intent();
  
                      Bundle extras = new Bundle();
                      extras.putString("Is_been_there", video.getIs_been_there());
                      extras.putString("videoid", video.getId());
                      intent.putExtras(extras);
                      intent.setAction("beenthereclicked");
                      mContext.sendBroadcast(intent);
      }
  }
  </code></pre>
  
  <p>NetworkChangeReceiver.java</p>
  
  <pre><code> public class NetworkChangeReceiver extends BroadcastReceiver {
  
          @Override
          public void onReceive(final Context context, final Intent intent) {
      if (wifi.isConnected() || mobile.isAvailable())
              {
       Log.e("NetworkChangeReceiver", "wificonnected");
  
  
   Log.e("NetworkChangeReceiver","intent"+intent.getAction());//returns android.net.conn.CONNECTIVITY_CHANGE
                  if (intent.getAction().equals("beenthereclicked")) {
                      Log.e("NetworkChangeReceiver", "beenthereclicked");
  
                      Bundle extras = intent.getExtras();
                      String isbeenthere = extras.getString("Is_been_there");
                      String videoid = extras.getString("videoid");
                      if (isbeenthere.equals("false"))
                      {
                          BeenThereAPI.unlike(context, videoid, new APIResponseListener() {
                              @Override
                              public void onResponse(Object response) {
  
  
  
                              }
  
                              @Override
                              public void onError(VolleyError error) {
  
  
                              }
                          });
                      }
                      else
                      {
                          BeenThereAPI.like(context, videoid, new APIResponseListener()
                          {
  
                              @Override
                              public void onResponse(Object response)
                              {
  
  
                              }
  
                              @Override
                              public void onError(VolleyError error)
                              {
  
  
                              }
                          });
                      }
                  }
      }
  </code></pre>
  
  <p>AndroidManifest</p>
  
  <pre><code>&lt;receiver android:name="xyz.NetworkChangeReceiver" android:enabled="true"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.PHONE_STATE"&gt;&lt;/action&gt;
              &lt;action android:name="android.net.conn.CONNECTIVITY_CHANGE"/&gt;
             &lt;action android:name="android.net.wifi.WIFI_STATE_CHANGED"/&gt;
              &lt;action android:name="beenthereclicked"&gt;&lt;/action&gt;
              &lt;action android:name="mustgoclicked"&gt;&lt;/action&gt;
              &lt;action android:name="commentposted"&gt;&lt;/action&gt;
          &lt;/intent-filter&gt;
      &lt;/receiver&gt;
  </code></pre>