How to Enable and Disable Mobile Data Using API: Difference between revisions

From wizarPOS
No edit summary
(Replaced content with "{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/sim-ethenet-wifi/enable-disable-mobile-data-api}}")
Tag: Replaced
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
The system provides the AIDL interface to Enable/Disable mobile data or mobile data roaming, When connect the service, the package name is '''com.wizarpos.wizarviewagentassistant''', and the class name is '''com.wizarpos.wizarviewagentassistant.SystemExtApiService'''. When the application uses the interface, it must import wizarviewagentassistant and add permissions to the Android manifest file.
{{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/sim-ethenet-wifi/enable-disable-mobile-data-api}}
== Permission ==
The application declares the following permissions in the manifest:
  android.permission.CLOUDPOS_SET_MOBILE_DATA
== API Overview ==
=== <big>setMobileDataEnabled</big>===
  <syntaxhighlight lang="java">boolean setMobileDataEnabled(int slot, boolean enable);</syntaxhighlight>
Enable/Disable mobile data.
 
{|class="wizarpostable"
|-
! scope="row" colspan="2" | Parameters
|-
| slot|| '''int:''' 1 = slot 1, 2 = slot 2.
|-
| enable|| '''boolean:''' true/false.
|}
{|
|-
|}
 
{|class="wizarpostable"
|-
!  scope="row" colspan="2" | Returns
|-
|  boolean || whether the new state has been set, true is success, falas is fail.
|}
 
=== <big>setMobileDataRoamingEnabled</big>===
  <syntaxhighlight lang="java">boolean setMobileDataRoamingEnabled(int slot, int roaming);</syntaxhighlight>
Enable/Disable mobile data roaming.
 
{|class="wizarpostable"
|-
! scope="row" colspan="2" | Parameters
|-
| slot|| '''int:''' 1 = slot 1, 2 = slot 2.
|-
| roaming|| '''int:''' 0 = disable, 1= enable.
|}
{|
|-
|}
 
{|class="wizarpostable"
|-
!  scope="row" colspan="2" | Returns
|-
|  boolean || whether the new state has been set, true is success, false is fail.
|}
 
== Download ==
=== AIDL file===
Please download the [http://ftp.wizarpos.com/advanceSDK/ISystemExtApi.aidl AIDL file]. About how to bind service, please refer to the demo in [[How to Configure Access Point Name (APN) Settings]].

Latest revision as of 09:13, 7 April 2024

Please visit new link of same subject:

https://smartpossdk.gitbook.io/cloudpossdk/faq/sim-ethenet-wifi/enable-disable-mobile-data-api

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!