How to Enable or Disable Network Usage in WizarviewAgent: Difference between revisions

From wizarPOS
(Replaced content with "{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/tms-wizarview/toggle-network-in-agent}}")
Tag: Replaced
 
Line 1: Line 1:
== Prerequisite ==
{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/tms-wizarview/toggle-network-in-agent}}
* 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
<syntaxhighlight lang="java" line='line'>
  Intent enableIntent = new Intent();
  enableIntent.putExtra("net_use_control_flag", "enable");
  enableIntent.setAction("android.intent.action.NET_USE_CONTROL");
  getApplicationContext().sendBroadcast(enableIntent);
</syntaxhighlight >
* Disable
<syntaxhighlight lang="java" line='line'>
  Intent disableIntent = new Intent();
  disableIntent.putExtra("net_use_control_flag", "disable");
  disableIntent.setAction("android.intent.action.NET_USE_CONTROL");
  getApplicationContext().sendBroadcast(disableIntent);
</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.

Latest revision as of 05:10, 8 April 2024

Please visit new link of same subject:

https://smartpossdk.gitbook.io/cloudpossdk/faq/tms-wizarview/toggle-network-in-agent

We're making a move! Our site's content is migrating to a new URL, to provide you with an enhanced browsing experience. Please update your bookmarks accordingly. Thank you for your continuous support!