Faheem Khatri <faheemkhatri88 <at> gmail.com> writes:
>
>
> By the way yout email get me hint, i m trying to resolve this thing.
>
> i've got a function which is :
>
> wifiManaget.addNetwork(wifimanager object)
> do you have any idea what this function do?
>
> 2010/12/30 Kostya Vasilyev <kmansoft <at> gmail.com>
>
> You can change these settings from an application - just need right the
permission ("write_system_settings" or some such).-- Kostya30.12.2010 10:59,
Faheem Khatri пишет:
>
>
>
>
> public static final String WIFI_STATIC_DNS1
>
> as you see these are the properties in which we can only get the value, we
cant set the value.
>
> On Wed, Dec 29, 2010 at 7:47 PM, Kostya Vasilyev <kmansoft <at> gmail.com>
wrote:Faheem,See
Settings.System:http://developer.android.com/reference/android/provider/Settings
.System.html#WIFI_STATIC_DNS1Starting with:public static final String
WIFI_STATIC_DNS1Since: API Level 1If using static IP, the primary DNS's IP
address.Example: "192.168.1.1"Constant Value: "wifi_static_dns1"
>
> and up throughpublic static final String WIFI_USE_STATIC_IPSince: API Level
1Whether to use static IP and other static network attributes.Set to 1 for true
and 0 for false.Constant Value: "wifi_use_static_ip"
>
> However, if past is of any indication, any of these can be moved to
Settings.Secure in a future Android release (or not).-- Kostya29.12.2010 17:34,
Faheem Khatri пишет:
>
>
> Hi All,I wanna set android wifi ip address from my own application is
> thereany
way?i've post this question few months back didnt get any proper solution,so i
m
reposting this question.Regards,Faheem
>
>
>
> -- Kostya Vasilyev -- WiFi Manager + pretty widget --
http://kmansoft.wordpress.com-- You received this message because you are
subscribed to the GoogleGroups "Android Developers" group.To post to this
group,
send email to android-developers <at> googlegroups.com
> To unsubscribe from this group, send email toandroid-developers+unsubscribe
<at> googlegroups.comFor more options, visit this group
athttp://groups.google.com/group/android-developers?hl=en
>
>
> -- 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 <at> googlegroups.comTo unsubscribe from this group, send
email toandroid-developers+unsubscribe <at> googlegroups.comFor more options,
visit this group athttp://groups.google.com/group/android-developers?hl=en
> --
> Kostya Vasilyev -- WiFi Manager + pretty widget --
http://kmansoft.wordpress.com
>
>
>
>
>
>
> -- You received this message because you are subscribed to the GoogleGroups
"Android Developers" group.To post to this group, send email to android-
developers <at> googlegroups.com
> To unsubscribe from this group, send email toandroid-developers+unsubscribe
<at> googlegroups.comFor more options, visit this group
athttp://groups.google.com/group/android-developers?hl=en
>
>
>
>
>
>
I had the same problem, but I managed tu solve it.
You have to do this:
First, obtain the content resolver:
ContentResolver cr = getContentResolver();
And then you can modify the settings:
Settings.System.putString(cr, Settings.System.WIFI_USE_STATIC_IP, "1");
Settings.System.putString(cr, Settings.System.WIFI_STATIC_IP, "6.6.6.6");
And you need to enable the permissions: WRITE_SETTINGS and WRITE_SECURE_SETTINGS
Nicolas
--
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