You are missing a D at the end of your action string. It is android.net.wifi.WIFI_STATE_CHANGED.
On Sun, Apr 24, 2011 at 5:32 PM, abd <[email protected]> wrote: > Hi, > > The App I am currently developing needs a wifi connection, so I want > to listen to the wifi state. For example I want to display a warning > message if there is no wifi connection. > To achieve this I try to write a BroadcastReciever, here is the code I > use : > > public class ConnectionChangeReceiver extends BroadcastReceiver { > public void onReceive( Context context, Intent intent ) { > Log.e("ConnectionChange","onRecieve lunch"); > } > } > > I declare this BroadcastReciever in the manifest (inside <activity></ > activity>) : > > <receiver > android:name="fr.esial.smartshare.ConnectionChangeReceiver" > > <intent-filter> > <action android:name="android.net.wifi.STATE_CHANGE"></action> > </intent-filter> > </receiver> > > my application have the right permissions : > > <uses-permission > android:name="android.permission.CHANGE_WIFI_STATE" /> > <uses-permission > android:name="android.permission.ACCESS_WIFI_STATE" /> > <uses-permission > android:name="android.permission.ACCESS_NETWORK_STATE" /> > > But I see nothing in the LogCat when I enable/disable wifi or join a > new wifi network. I don't understand what is going wrong. > Any help will be appreciate. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2 -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

