'How to turn off/on the LAN network card of an android device programmatically

I have a Tablet android device. I have set a static ip address on network LAN card of this device. The problem is: after restarting(or power losing) of tablet, the ip address will be lost and i have to manually off/on the network adapter in the network setting to getting the defined ip address again. My question is: How can i do this issue programmatically? With python, script louncher,...etc

I think that i need a simple script function which handles this issue automatically for one time right after starting up of android device..

It would be great that you would like to gelp me in this way..

Thank you again!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source