How to Enable or Disable Network Usage in WizarviewAgent: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== Prerequisite == | |||
* Ensure that the Wizarview agent version on the device is greater than 5.3.39 to use this feature. | |||
== Steps to Control Network Usage == | |||
* Prepare the Broadcast Intent: | |||
** You will need to send a broadcast intent to control the network usage of the Wizarview agent. | |||
** The action for the intent should be set to: ''''android.intent.action.NET_USE_CONTROL''''. | |||
* Set the Extra Value: | |||
** Along with the action, you need to include an extra value in the broadcast. | |||
** The extra value should have the name ''''net_use_control_flag''''. | |||
** The value for this should be either ''''enable'''' or ''''disable'''', depending on whether you want to activate or deactivate the network usage. | |||
* Enable | * Enable | ||
<syntaxhighlight lang="java" line='line'> | <syntaxhighlight lang="java" line='line'> | ||
Line 16: | Line 23: | ||
getApplicationContext().sendBroadcast(disableIntent); | getApplicationContext().sendBroadcast(disableIntent); | ||
</syntaxhighlight > | </syntaxhighlight > | ||
'''Note:''' | |||
* It's important to correctly implement this broadcast mechanism, as incorrect usage could lead to unintended behaviors in the Wizarview agent's network management. | |||
* This feature is particularly useful for customers who need precise control over their device's network activities for efficiency or security reasons. |
Revision as of 15:26, 13 January 2024
Prerequisite
- Ensure that the Wizarview agent version on the device is greater than 5.3.39 to use this feature.
Steps to Control Network Usage
- Prepare the Broadcast Intent:
- You will need to send a broadcast intent to control the network usage of the Wizarview agent.
- The action for the intent should be set to: 'android.intent.action.NET_USE_CONTROL'.
- Set the Extra Value:
- Along with the action, you need to include an extra value in the broadcast.
- The extra value should have the name 'net_use_control_flag'.
- The value for this should be either 'enable' or 'disable', depending on whether you want to activate or deactivate the network usage.
- Enable
Intent enableIntent = new Intent();
enableIntent.putExtra("net_use_control_flag", "enable");
enableIntent.setAction("android.intent.action.NET_USE_CONTROL");
getApplicationContext().sendBroadcast(enableIntent);
- Disable
Intent disableIntent = new Intent();
disableIntent.putExtra("net_use_control_flag", "disable");
disableIntent.setAction("android.intent.action.NET_USE_CONTROL");
getApplicationContext().sendBroadcast(disableIntent);
Note:
- It's important to correctly implement this broadcast mechanism, as incorrect usage could lead to unintended behaviors in the Wizarview agent's network management.
- This feature is particularly useful for customers who need precise control over their device's network activities for efficiency or security reasons.