android connectivity check
<p>I am currently doing an android application that checks network availability(both wifi &amp; 3G).
i have a code that perfectly working in activity . but i need it in broadcast receiver . i want to do some operations when the network is available .
i have the permission
 </p>

<p>plz help me.....</p>

<p>The code is given below...</p>

<pre><code> ConnectivityManager cm =   (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);

 if ( cm.equals(ConnectivityManager.EXTRA_NO_CONNECTIVITY))
    {

  Log.v("CONNECT", "CONNECTED");
    }
 else
 {
  Log.v("CONNECT", "NOT CONNECTED"); 

 }
</code></pre>

<p>`</p>
