How to Configure Access Point Name (APN) Settings: Difference between revisions

From wizarPOS
No edit summary
No edit summary
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.
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.
== Permission ==
== Permission ==
   com.wizarpos.permission.WRITE_APN_SETTINGS
   com.wizarpos.permission.WRITE_APN_SETTINGS
The app declares the permission in the manifest.
The app declares the permission in the manifest.


== Functions ==
== API Overview ==
=== addByAllArgs===
=== <big>addByAllArgs</big>===
   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);
   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);
Add an APN setting.
Add an APN setting.


'''Parameters'''
{|class="wizarpostable"
{|
|-
! scope="row" colspan="2" | Parameters
|-
|-
| ''name'' || String || Not null.
| name || '''String:''' Not null.
|-
|-
| ''apn'' || String || Not null.
| apn || '''String:'''  Not null.
|-
|-
| ''mcc'' || String || Not null.
| mcc || '''String:''' Not null.
|-
|-
| ''mnc'' || String || Not null.
| mnc || '''String:'''  Not null.
|-
|-
| ''proxy'' || String ||
| proxy || '''String:'''  
|-
|-
| ''port'' || String ||
| port || '''String:'''
|-
|-
| ''MMSProxy'' || String ||
| MMSProxy || '''String:'''
|-
|-
| ''MMSPort'' || String ||
| MMSPort || '''String:'''
|-
|-
| ''userName'' || String ||
| userName || '''String:'''  
|-
|-
| ''server'' || String ||
| server || '''String:'''  
|-
|-
| ''password'' || String ||
| password || '''String:'''  
|-
|-
| ''MMSC'' || String ||
| MMSC || '''String:'''  
|-
|-
| ''authType'' || String || Null(default),PAP,CHAP,PAP/CHAP
| authType ||  '''String:''' Null(default),PAP,CHAP,PAP/CHAP
|-
|-
| ''protocol'' || String || IPV4(default),IPV6,IPV4/IPV6
| protocol ||  '''String:''' IPV4(default),IPV6,IPV4/IPV6
|-
|-
| ''roamingProtocol'' || String || IPV4(default),IPV6,IPV4/IPV6
| roamingProtocol ||  '''String:''' IPV4(default),IPV6,IPV4/IPV6
|-
|-
| ''type'' || String ||
| type ||  '''String:'''  
|-
|-
| ''bearer'' || String || Null(default),LTE,eHRPD
| bearer ||  '''String:''' Null(default),LTE,eHRPD
|-
|-
| ''MVNOType'' || String || Null(default),SPN,IMSI,GID
| MVNOType ||  '''String:''' Null(default),SPN,IMSI,GID
|-
|-
| ''MVNOMatchData'' || String ||
| MVNOMatchData ||  '''String:'''  
|}
|}
'''Returns'''
{|
"succeed" is success, "error description" is failure.
|-
|}
{|class="wizarpostable"
|-
!  scope="row" colspan="2" | Returns
|-
|  String || "succeed" is success, "error description" is failure.
|}
 


=== add===
=== <big>add</big>===
   String add(String name, String apn);
   String add(String name, String apn);
Add an APN setting.
Add an APN setting.


'''Parameters'''
{|class="wizarpostable"
|-
! scope="row" colspan="2" | Parameters
|-
| name ||  '''String:''' Not null.
|-
| apn ||  '''String:''' Not null.
|}
{|
{|
|-
|-
| ''name'' || String || Not null.
|  
|}
{|class="wizarpostable"
|-
|-
| ''apn'' || String || Not null.
!  scope="row" colspan="2" | Returns
|-
| String || "succeed" is success, "error description" is failure.
|}
|}
'''Returns'''
"succeed" is success, "error description" is failure.


=== addByMCCAndMNC ===
 
=== <big>addByMCCAndMNC</big> ===
   String addByMCCAndMNC(String name, String apn, String mcc, String mnc);
   String addByMCCAndMNC(String name, String apn, String mcc, String mnc);
Add an APN setting.
Add an APN setting.


'''Parameters'''
{|class="wizarpostable"
|-
! scope="row" colspan="2" | Parameters
|-
| name || '''String:''' Not null.
|-
| apn ||  '''String:'''  Not null.
|-
| mcc ||  '''String:''' Not null.
|-
| mnc ||  '''String:''' Not null.
|}
{|
{|
|-
|-
| ''name'' || String || Not null.
|  
|}
{|class="wizarpostable"
|-
|-
| ''apn'' || String ||  Not null.
!  scope="row" colspan="2" | Returns
|-
|-
| ''mcc'' || String || Not null.
| String || "succeed" is success, "error description" is failure.
|-
| ''mnc'' || String ||  Not null.
|}
|}
'''Returns'''
"succeed" is success, "error description" is failure.


=== setSelected ===
 
=== <big>setSelected</big> ===
   boolean setSelected(String name);
   boolean setSelected(String name);
Set default APN.
Set default APN.


'''Parameters'''
{|class="wizarpostable"
|-
! scope="row" colspan="2" | Parameters
|-
| name || '''String:''' Not null.
|}
{|
{|
|-
|-
| ''name'' || String || Not null.
|  
|}
{|class="wizarpostable"
|-
!  scope="row" colspan="2" | Returns
|-
|  boolean || true is success, false is failure.
|}
|}
'''Returns'''
true is success, false is failure.


=== clear ===
 
=== <big>clear</big> ===
   boolean clear();
   boolean clear();
Clear all APN settings.
Clear all APN settings.


'''Parameters'''
{|class="wizarpostable"
|-
!  scope="row" colspan="2" | Returns
|-
|  boolean || true is success, false is failure.
|}


'''Returns'''
true is success, false is failure.


== Download ==
== Download ==
Please download the [ftp://sdkuser:wizsdkar@ftp.wizarpos.com/IAPNManagerService.aidl aidl file]
Please download the [ftp://sdkuser:wizsdkar@ftp.wizarpos.com/IAPNManagerService.aidl aidl file]

Revision as of 10:19, 3 May 2018

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.

Permission

 com.wizarpos.permission.WRITE_APN_SETTINGS

The app declares the permission in the manifest.

API Overview

addByAllArgs

  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);

Add an APN setting.

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:
Returns
String "succeed" is success, "error description" is failure.


add

 String add(String name, String apn);

Add an APN setting.

Parameters
name String: Not null.
apn String: Not null.
Returns
String "succeed" is success, "error description" is failure.


addByMCCAndMNC

 String addByMCCAndMNC(String name, String apn, String mcc, String mnc);

Add an APN setting.

Parameters
name String: Not null.
apn String: Not null.
mcc String: Not null.
mnc String: Not null.
Returns
String "succeed" is success, "error description" is failure.


setSelected

 boolean setSelected(String name);

Set default APN.

Parameters
name String: Not null.
Returns
boolean true is success, false is failure.


clear

 boolean clear();

Clear all APN settings.

Returns
boolean true is success, false is failure.


Download

Please download the aidl file