Hi I have gone to the link you suggested. But i have less knowledge in android i don't know exactly how can i set ip for each profile. For example if i open wifi settings in my phone. It is automatically scanning available wifi profiles with several details like(SSID name, Security type and ip address). Similarly if i want to see my new profile(Which i am adding through above code) details where is the place or where can assign ip.
Thank you once again On Mar 22, 3:00 pm, Kostya Vasilyev <kmans...@gmail.com> wrote: > See this: > > http://developer.android.com/reference/android/provider/Settings.Syst... > > Go ahead and use them before they are moved under Settings.Secure :) > > -- Kostya > > 22.03.2011 12:17, saikiran n ?????: > > > > > > > > > > > Hi > > > I have android device and i want to add one wifi configuration with > > static ip. > > I have done this with the following code. > > > WifiManager wifi = (WifiManager) > > getSystemService(Context.WIFI_SERVICE); > > WifiConfiguration wc = new WifiConfiguration(); > > wc.SSID = "\"MyWifi\""; > > wc.hiddenSSID = true; > > wc.status = WifiConfiguration.Status.DISABLED; > > wc.priority = 40; > > wc.allowedKeyManagement.set(WifiConfiguration.KeyMgmt.NONE); > > wc.allowedProtocols.set(WifiConfiguration.Protocol.RSN); > > wc.allowedProtocols.set(WifiConfiguration.Protocol.WPA); > > wc.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.OPEN); > > wc.allowedAuthAlgorithms.set(WifiConfiguration.AuthAlgorithm.SHARED); > > wc.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.CCMP); > > wc.allowedPairwiseCiphers.set(WifiConfiguration.PairwiseCipher.TKIP); > > wc.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP40); > > wc.allowedGroupCiphers.set(WifiConfiguration.GroupCipher.WEP104); > > wifi.addNetwork(wc); > > > But i don't know where to assign an ip address. > > > Thanks in advance > > saikiran > > > -- > > You received this message because you are subscribed to the Google > > Groups "Android Developers" group. > > To post to this group, send email to android-developers@googlegroups.com > > To unsubscribe from this group, send email to > > android-developers+unsubscr...@googlegroups.com > > For more options, visit this group at > >http://groups.google.com/group/android-developers?hl=en > > -- > Kostya Vasilyev --http://kmansoft.wordpress.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en