In this program I use some constants such as WIFI_STATIC_IP change to a static IP.
When I create the file.apk and install on Android API-10 or version 2.3.3 seems to work. It connects to the wireless and fixed IP assigned.
Yet another tablet Api-15 or version 4.0.3 connects to the wifi but does not change the IP. However it indicates that these constants are Deprecated in API-17 or higher.
I don't understand because it only works on the API-11 version and not in the API-15, or symply I don't understand what is Deprecated.
Settings.System.putInt(cr, Settings.System.ACCELEROMETER_ROTATION, 0);
Settings.System.putInt(cr, Settings.System.WIFI_USE_STATIC_IP, 1);
Settings.System.putString(cr, Settings.System.WIFI_STATIC_IP, "192.168.1.209");
Settings.System.putString(cr, Settings.System.WIFI_STATIC_NETMASK, "255.255.255.0");
Settings.System.putString(cr, Settings.System.WIFI_STATIC_GATEWAY, "192.168.1.1");
Settings.System.putString(cr, Settings.System.WIFI_STATIC_DNS1, "192.168.1.1");
Moreover in the manifest.xml file I indicate this versions:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />