Q:

Turn off/on network programmatically

I'm trying to get access to Network status to turn it off or on.
I have already write the code to get the status of the network using RadioInfo but I can't figure out how to switch them on/off. I have looked into Radio and RadioInfo APIs, but i can't find an API that allows me to control Network. Here's my code to get network status :

    private boolean GetRadInfo() { 
        if(RadioInfo.getState() == RadioInfo.STATE_ON)
        {
            return true;
        }
        else{
            return false;
        }
    }

is there any idea how to switch OFF/ON ?

A:

Solved I used Radio.deactivateWAFs(int);

