|
|
(21 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
| The APN interface is provided by the system by AIDL interface, package name is '''com.wizarpos.wizarviewagentassistant''', class name is '''com.wizarpos.wizarviewagentassistant.APNManagerService''' . The application must import the package when using the interface and add the uses-permission in android manifest file.
| | {{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/sim-ethenet-wifi/add-apn-api}} |
| == Permission ==
| |
| com.wizarpos.permission.WRITE_APN_SETTINGS
| |
| The app declares the permission in the manifest.
| |
| | |
| == API Overview ==
| |
| === <big>addByAllArgs</big>===
| |
| <syntaxhighlight lang="java">String addByAllArgs(String name, String apn, String mcc, String mnc, String proxy, String port, String MMSProxy, String MMSPort, String userName, String server, String password, String MMSC, String authType, String protocol, String roamingProtocol, String type, String bearer, String MVNOType, String MVNOMatchData);</syntaxhighlight >
| |
| Add an APN setting.
| |
| | |
| {|class="wizarpostable" | |
| |-
| |
| ! scope="row" colspan="2" | Parameters
| |
| |-
| |
| | name || '''String:''' Not null.
| |
| |-
| |
| | apn || '''String:''' Not null.
| |
| |-
| |
| | mcc || '''String:''' Not null.
| |
| |-
| |
| | mnc || '''String:''' Not null.
| |
| |-
| |
| | proxy || '''String:'''
| |
| |-
| |
| | port || '''String:'''
| |
| |-
| |
| | MMSProxy || '''String:'''
| |
| |-
| |
| | MMSPort || '''String:'''
| |
| |-
| |
| | userName || '''String:'''
| |
| |-
| |
| | server || '''String:'''
| |
| |-
| |
| | password || '''String:'''
| |
| |-
| |
| | MMSC || '''String:'''
| |
| |-
| |
| | authType || '''String:''' Null(default),PAP,CHAP,PAP/CHAP
| |
| |-
| |
| | protocol || '''String:''' IPV4(default),IPV6,IPV4/IPV6
| |
| |-
| |
| | roamingProtocol || '''String:''' IPV4(default),IPV6,IPV4/IPV6
| |
| |-
| |
| | type || '''String:'''
| |
| |-
| |
| | bearer || '''String:''' Null(default),LTE,eHRPD
| |
| |-
| |
| | MVNOType || '''String:''' Null(default),SPN,IMSI,GID
| |
| |-
| |
| | MVNOMatchData || '''String:'''
| |
| |}
| |
| {|
| |
| |-
| |
| |
| |
| |}
| |
| {|class="wizarpostable"
| |
| |-
| |
| ! scope="row" colspan="2" | Returns
| |
| |-
| |
| | String || "succeed" is success, "error description" is failure.
| |
| |}
| |
| | |
| | |
| === <big>add</big>===
| |
| <syntaxhighlight lang="java">String add(String name, String apn);</syntaxhighlight >
| |
| Add an APN setting.
| |
| | |
| {|class="wizarpostable"
| |
| |-
| |
| ! scope="row" colspan="2" | Parameters
| |
| |-
| |
| | name || '''String:''' Not null.
| |
| |-
| |
| | apn || '''String:''' Not null.
| |
| |}
| |
| {|
| |
| |-
| |
| |
| |
| |}
| |
| {|class="wizarpostable"
| |
| |-
| |
| ! scope="row" colspan="2" | Returns
| |
| |-
| |
| | String || "succeed" is success, "error description" is failure.
| |
| |}
| |
| | |
| | |
| === <big>addByMCCAndMNC</big> ===
| |
| <syntaxhighlight lang="java">String addByMCCAndMNC(String name, String apn, String mcc, String mnc);</syntaxhighlight >
| |
| Add an APN setting.
| |
| | |
| {|class="wizarpostable"
| |
| |-
| |
| ! scope="row" colspan="2" | Parameters
| |
| |-
| |
| | name || '''String:''' Not null.
| |
| |-
| |
| | apn || '''String:''' Not null.
| |
| |-
| |
| | mcc || '''String:''' Not null.
| |
| |-
| |
| | mnc || '''String:''' Not null.
| |
| |}
| |
| {|
| |
| |-
| |
| |
| |
| |}
| |
| {|class="wizarpostable"
| |
| |-
| |
| ! scope="row" colspan="2" | Returns
| |
| |-
| |
| | String || "succeed" is success, "error description" is failure.
| |
| |}
| |
| | |
| | |
| === <big>setSelected</big> ===
| |
| <syntaxhighlight lang="java">boolean setSelected(String name);</syntaxhighlight >
| |
| Set default APN.
| |
| | |
| {|class="wizarpostable"
| |
| |-
| |
| ! scope="row" colspan="2" | Parameters
| |
| |-
| |
| | name || '''String:''' Not null.
| |
| |}
| |
| {|
| |
| |-
| |
| |
| |
| |}
| |
| {|class="wizarpostable"
| |
| |-
| |
| ! scope="row" colspan="2" | Returns
| |
| |-
| |
| | boolean || true is success, false is failure.
| |
| |}
| |
| | |
| | |
| === <big>clear</big> ===
| |
| <syntaxhighlight lang="java">boolean clear();</syntaxhighlight >
| |
| Clear all APN settings.
| |
| | |
| {|class="wizarpostable"
| |
| |-
| |
| ! scope="row" colspan="2" | Returns
| |
| |-
| |
| | boolean || true is success, false is failure.
| |
| |}
| |
| | |
| | |
| == Download ==
| |
| Please download the [ftp://sdkuser:wizsdkar@ftp.wizarpos.com/IAPNManagerService.aidl aidl file]
| |