CloudPOS SDK
  • CloudPOS SDK
    • EMV Develop Spec
    • Scanning Service Usage
    • API Specification
    • CloudPOS SDK AAR
    • Java API Samples
    • Permissions
    • Error code
    • MDB Communication Protocal
  • POS_Specs
  • FAQ
    • SDK Error Collection
      • Printer
      • PINPAD
      • Contactless Card
      • IC Card
      • MSR Card
    • Hardware/Repair
      • Recover a Tampered Terminal
      • Learning Tampered Events
      • Remotely Reactivate from Tamper
      • TF (Micro SD) Card Suggestion
      • Understand Tamper Reason
    • Printer
      • Verify Terminal Printer Status
      • Print Unsupported Character Sets
      • Use Terminal Bluetooth Printer
      • Print Images
      • Print QR Codes
      • Evaluate HTML Print Performance
      • Evaluate Print Performance
      • Print with TM T88IV
      • Replace HTML Print Font
      • Java API Printer Operations
      • Understanding Image Print Gaps
      • Print with JavaScript
      • Verify Printer Paper Status
    • USB/Serial Port
      • Install Terminal USB Drivers
      • Install UU Cable Driver
      • Reinstall Production Serial Drivers
      • Linux Serial Driver Installation
      • Serial Port Development
      • Add Linux Udev Rules
      • ReOpen Serial after Wake-up
      • Close Serial after Disconnect
      • Connect Accessory Mode
      • Detect UU Cable Connnected
      • Control Fan via Serial Port
      • List Connected USB Devices
      • Accessory Agent Service D22/Q3
    • Firmware
      • Update Firmware
      • Understand Firmware Naming
      • Compare Engineer/User Modes
      • Configure POS Home Settings
      • Configure POS System Settings
      • Prevent Accidental App Uninstallation
      • Troubleshoot "Agent Stopped" Error
      • Resolve Forgotten Lock Password
      • Utilize Q1 Buttons
      • Adapt Q1 4G
      • Customize Boot Logo/Animation
      • Set Wallpaper
      • Activate Startup Special Mode
      • Install Browsers
      • Understand Firmware External Access
      • Get Terminal Firmware Modes
      • Write Customer Serial Numbers
      • Enable Touch Screen Wake-Up
      • Set User System Properties
      • Update POS WebView
      • Disable File Explorer for TF/Pendrives
      • Manage Screen On/Off
    • Settings Menu
      • Perform Factory Data Reset
      • Understand Settings Menus
      • View Terminal Certificate List
      • Understand Merchant Self Test
      • Use Network Self-Test
      • Change System Language
      • Log in as Administrator
      • Enable Settings Menu Role Control
      • Disable Bluetooth/Wi Fi
      • Enable/Disable Auto Time Zone
      • Enable/Disable Automatic Time
      • Grant Accessibility Permission Automatically
      • Disable Security Lock
      • Access Settings Sub Menu
    • Battery/Power
      • Understand Special Charging Indicator
      • Preserve Terminal Battery Life
      • Understand Q2 Low-voltage Shutdown
      • Understand Terminal Battery Performance
      • Understand Counter Mode
    • SIM/Ethenet/WIFI
      • Disable POS Hotspot
      • Retrieve Terminal IMEI Number
      • Retrieve Terminal MEID Number
      • Understand Modem Bands
      • Troubleshoot Terminal SIM Signal
      • Resolve SIM Network Issues
      • Troubleshoot Network Search Error
      • Check eSIM Status
      • Ethernet Connectivity Usage
      • Set Communication Mode
      • Troubleshoot USSD Issues
      • Activate eSIM
    • Certificate
      • Apply App Certificates
      • Renew App Certificate
      • App Installation Controls
      • Install CA Certificates
      • Clear Terminal Certificates
      • Understand Certificate Visibility
    • Card
      • Contactless Card Distance
      • NFC Buffer Size Understanding
      • Use Contactless CPU Card
      • Use Felica Card
      • Use Mifare Card
      • Understand PSAM Card Exceptions
      • Optimal Tap Positioning Guide
    • FingerPrint
      • Fingerprint Module Usage Guide
      • Fingerprint DPI Specifications
      • Fingerprint Data Formats
    • Other Development
      • New Android Studio Versions
      • Setup ANDROID HOME
      • App Signing Process
      • Install POS Applications
      • Create First Android App
      • Retrieve Terminal Logs
      • Resolve APK Signature Conflict
      • Obtain Unfiltered Full Log
      • Obtain Terminal Current Location
      • Use Terminal Camera
      • Get Test APKs
      • Learn ADB Commands
      • Get Advanced Demos
      • Import Java SDK in C
      • Obtain Signal Strength
      • Get D3 Demos
      • Display Full Screen Android API
      • Disable Home Key
      • Retrieve Terminal Info
      • Save Files Locally
      • Set Default Launcher
      • Get Firmware Version
      • Get Firmware&EMV Version
      • Implement TLSv1.3
      • Auto-Run Post-Install
      • Understand Secure Connections
      • Use AnyDesk
      • Export Database to SD
      • Migrate App to Q2Premium
      • Auto-Run App Post-Boot
      • Integrate Java SDK in Flutter
      • Call AIDL Interface
      • Connect wirelessly
      • Get POS SN
      • UPT development-related
      • Q3 PDA Terminal Barcode Scanner
    • Key Injection
      • Inject Test Keys Remotely
      • Understand DUKPT
      • Understand Master&Session Keys
      • Use TMK KeyLoader POS
      • Understand Remote Key Injection
      • Resolve Serial Timeout
      • Import TMK Error: 74496
    • PINPAD
      • PINPAD Configuration Summary
      • Customize PINPAD GUI
    • TMS/Wizarview
      • TMS Overview
      • TMS User Guide
      • Register Terminal to WizarView
      • Accept TMS File Downloads
      • Handle User Locked Status
      • Apply WizarView Account
      • Batch Import Terminals
      • Unbind App Configuration
      • Remove App via TMS
      • Understand Agent Error Codes
      • Understand TMS IP Ports
      • Understand Update Scenarios
      • Understand App Binding Types
      • Apply RMA Maintenance Account
      • Update Firmware Remotely
      • Push APK to Specific Device
      • Set Agent Working Mode
      • Manage APK Prompt Installation
      • Network Control in Agent
      • Push Apps Using Tags
      • Deploy AID/CAPK via TMS
    • EMV
      • What's Tag91
      • What's CAPK
      • Set Issuer Scripts
      • Resolve Detection Priority Conflict
    • Advance SDK
      • Display Full-Screen API
      • Block Status Bar API
      • Learn Kiosk Mode
      • Set Language API
      • Set Display Sleep
      • Update Role Passwords API
      • Update Time Zone from IP
      • Update Terminal Time Zone
      • Update Terminal Time
      • Change Administrator's Login Password
      • Enable and Disable MTP
      • Disable notification badges
      • Scheduled Terminal Reboot Setup
      • Activate POS Hotspot
      • Enable/Disable Ethernet
      • Capture Power Button API
      • Enable/Disable Mobile Data API
      • Set Static Ethernet API
      • Set Network Operators API
      • Add APN API
      • Set Preferred Network Type API
      • Turn Off Terminal API
  • Wizarview Open API
Powered by GitBook
On this page
  1. FAQ
  2. Advance SDK

Add APN API

PreviousSet Network Operators APINextSet Preferred Network Type API

Last updated 8 months ago

CtrlK
  • Permission
  • API Overview
  • Download

The system provides the AIDL interface to set the APN. The package name is com.wizarpos.wizarviewagentassistant, and the class name is com.wizarpos.wizarviewagentassistant.APNManagerService. When the application uses the interface, it must import the package and add permissions to the Android manifest file.

Please note that:

  • Insert SIM card first

  • The MCC, MNC should be the same as SIM card inserted

Permission

The application declares the following permissions in the manifest:

 com.wizarpos.permission.WRITE_APN_SETTINGS

API Overview

AddByAllArgs

String addByAllArgs(String name, String apn, String mcc, String mnc, String proxy, String port, String MMSProxy, String MMSPort, String userName

Add an APN setting. All paramers can not be set to Null.

Parameters
Value

name

the name of the APN setting. It can not be null or "".

apn

the apn of the APN setting. It can not be null or "".

mcc

the mcc of the APN setting. It can not be null or "".

mnc

the mnc of the APN setting. It can not be null or "".

proxy

the proxy of the APN setting. It can not be null, but can be "".

port

the port of the APN setting. It can not be null, but can be "".

MMSProxy

the MMSProxy of the APN setting. It can not be null, but can be "".

MMSPort

Returns

String

a string representation of the result.

"succeed" if success.

"error description" if failure.

Add

String add(String name, String apn);
Parameters

name

the name of the APN setting. It can not be null or "".

apn

the apn of the APN setting. It can not be null or "".

Returns

String

a string representation of the result.

"succeed" if success.

"error description" if failure.

AddByMCCAndMNC

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

Add an APN setting.

Parameters

name

the name of the APN setting. It can not be null or "".

apn

the apn of the APN setting. It can not be null or "".

mcc

the mcc of the APN setting. It can not be null or "".

mnc

the mnc of the APN setting. It can not be null or "".

Returns

String

a string representation of the result.

"succeed" if success.

"error description" if failure.

SetSelected

boolean setSelected(String name);

Set default APN.

Parameters

name

the name of the APN setting. It can not be null or "".

Returns

boolean

a boolean representation of the result.

true if success. false if failure.

getSelected()

Map getSelected();

Get detail information of the selected APN.

Returns

Map

a map representation of the result. Detail information map of the selected APN.

Snippet code:

HashMap res = (HashMap)mAPNManagerService.getSelected();
StringBuilder sb = new StringBuilder();
if (res != null) {
sb.append(Telephony.Carriers.NAME + ": ").append(res.get(Telephony.Carriers.NAME) + "\n")
.append(Telephony.Carriers.APN + ": ").append(res.get(Telephony.Carriers.APN) + "\n")
.append(Telephony.Carriers.PROXY + ": ").append(res.get(Telephony.Carriers.PROXY) + "\n")
.append(Telephony.Carriers.PORT + ": ").append(res.get(Telephony.Carriers.PORT) + "\n")
.append(Telephony.Carriers.MMSPROXY + ": ").append(res.get(Telephony.Carriers.MMSPROXY) + "\n")
.append(Telephony.Carriers.MMSPORT + ": ").append(res.get(Telephony.Carriers.MMSPORT) + "\n")
.append(Telephony.Carriers.USER + ": ").append(res.get(Telephony.Carriers.USER) + "\n")
.append(Telephony.Carriers.SERVER + ": ").append(res.get(Telephony.Carriers.SERVER) + "\n")
.append(Telephony.Carriers.MMSC + ": ").append(res.get(Telephony.Carriers.MMSC) + "\n")
.append(Telephony.Carriers.AUTH_TYPE + ": ").append(res.get(Telephony.Carriers.AUTH_TYPE) + "\n")
.append(Telephony.Carriers.PROTOCOL + ": ").append(String.valueOf(res.get(Telephony.Carriers.PROTOCOL)) + "\n")
.append(Telephony.Carriers.ROAMING_PROTOCOL + ": ").append(String.valueOf(res.get(Telephony.Carriers.ROAMING_PROTOCOL)) + "\n")
.append(Telephony.Carriers.TYPE + ": ").append(res.get(Telephony.Carriers.TYPE) + "\n")
.append(Telephony.Carriers.MCC + ": ").append(res.get(Telephony.Carriers.MCC) + "\n")
.append(Telephony.Carriers.MNC + ": ").append(res.get(Telephony.Carriers.MNC) + "\n")
.append(Telephony.Carriers.BEARER + ": ").append(res.get(Telephony.Carriers.BEARER) + "\n")
.append("mvno_type: ").append(String.valueOf(res.get("mvno_type")).toUpperCase() + "\n")
.append("mvno_match_data: ").append(res.get("mvno_match_data"));
}

Clear

boolean clear();

Clear all APN settings.

Returns

boolean

a boolean representation of the result.

true if success. false if failure.

Download

Please download the AddAPN demo

,
String
server
,
String
password
,
String
MMSC
,
String
authType
,
String
protocol
,
String
roamingProtocol
,
String
type
,
String
bearer
,
String
MVNOType
,
String
MVNOMatchData)
;

the MMSPort of the APN setting. It can not be null, but can be "".

userName

the userName of the APN setting. It can not be null, but can be "".

server

the server of the APN setting. It can not be null, but can be "".

password

the password of the APN setting. It can not be null, but can be "".

MMSC

the MMSC of the APN setting. It can not be null, but can be "".

authType

the authType of the APN setting. It can not be null or "", but can be "-1", PAP, CHAP, PAP/CHAP.

protocol

the protocol of the APN setting. It can not be null or "", but can be IP, IPV4, IPV6, IPV4/IPV6.

roamingProtocol

the roamingProtocol of the APN setting. It can not be null or "", but can be IP, IPV4, IPV6, IPV4/IPV6.

type

the type of the APN setting. It can not be null, but can be "".

bearer

the bearer of the APN setting. It can not be null or "", but can be "0", LTE, eHRPD.

MVNOType

the MVNOType of the APN setting. It can not be null, but can be "", SPN, IMSI, GID.

MVNOMatchData

the MVNOMatchData of the APN setting. It can not be null, but can be "".