Patent ID: 8838086

Claim:
A wireless device configured to execute a plurality of applications and communicate with a communication network, the wireless device comprising: a receiver configured to receive a plurality of rules specifying how one or more of the plurality of applications should communicate with the communication network; an input device configured to receive one or more inputs; and a processor configured to: determine whether the device is in a foreground state or a background state based on the presence or absence of one or more inputs; modify communication by one or more of the plurality of applications in compliance with the rules; and allow transmission of the communication by one or more of the plurality of applications in accordance with the rules, when the device is in the foreground state, wherein the rules allow or disallow transmission of the communication based on one or more of: a socket operation of the communication, a source port of the communication, a destination port of the communication, and a destination IP address of the communication, or a combination thereof.