hello,

I tried to receive the Wi-Fi State.
but,  "supplicantstate = COMPLETED"  is occured 2times. (just access
to a AP)
i cant' figure out and imagine the reason.




************************************

public class Test_BroadCastReceiverActivity extends BroadcastReceiver
{

        @Override
        public void onReceive(Context context, Intent intent) {

                Log.i(TAG, "----------------------------BroadCastReceiver");

                Intent wifiChecker0 = new Intent(context,Activity1.class);
                context.startActivity(wifiChecker0);
        }
}


************************************ Activity1.class
        protected void onCreate() {
                mWifiManager =
(WifiManager)getSystemService(Context.WIFI_SERVICE);
                SupplicantState supplicantstate =
mWifiManager.getConnectionInfo().getSupplicantState();          Log.e(TAG,
"supplicantstate = " + String.valueOf(supplicantstate));
                }

************************************
   <receiver
            android:name=".Test_BroadCastReceiverActivity"
            android:launchMode="singleInstance" >
            <intent-filter>
                <action
android:name="android.net.wifi.supplicant.STATE_CHANGE" />


            </intent-filter>
        </receiver>

-- 
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

Reply via email to