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
      • Enable and Disable MTP
      • Update POS WebView
      • Disable File Explorer for TF/Pendrives
      • Manage Screen On/Off
      • Disable notification badges
      • Scheduled Terminal Reboot Setup
    • 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
      • Change Administrator's Login Password
      • Update Terminal Time
      • Update Terminal Time Zone
      • Update Time Zone from IP
      • Enable Settings Menu Role Control
      • Update Role Passwords API
      • Disable Bluetooth/Wi Fi
      • Enable/Disable Auto Time Zone
      • Enable/Disable Automatic Time
      • Set Display Sleep
      • Grant Accessibility Permission Automatically
      • Disable Security Lock
      • Access Settings Sub Menu
      • Set Language API
    • Battery/Power
      • Understand Special Charging Indicator
      • Preserve Terminal Battery Life
      • Understand Q2 Low-voltage Shutdown
      • Understand Terminal Battery Performance
      • Understand Counter Mode
      • Turn Off Terminal API
    • SIM/Ethenet/WIFI
      • Disable POS Hotspot
      • Activate 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
      • Set Preferred Network Type API
      • Add APN API
      • Set Static Ethernet API
      • Enable/Disable Mobile Data API
      • Set Network Operators API
      • Activate eSIM
      • Enable/Disable Ethernet
    • 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
      • Learn Kiosk Mode
      • Block Status Bar API
      • Display Full-Screen API
      • Display Full Screen Android API
      • Disable Home Key
      • Capture Power Button API
      • 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
  • Wizarview Open API
Powered by GitBook
On this page
  • How to Configure a Parameter File in WizarView
  • How to Receive Parameter Files in the Application
  • Demo Application:
  1. FAQ
  2. TMS/Wizarview

Accept TMS File Downloads

PreviousRegister Terminal to WizarViewNextHandle User Locked Status

Last updated 10 months ago

How to Configure a Parameter File in WizarView

Configure Any Custom Parameter File:

  • Navigate to 'Applications > Application' in WizarView.

  • Click the + icon at the bottom left of the toolbox to open an edit window

  • In the edit window, enter the name and other required details. Select 'param' as the type.

  • Enter the package name of the app set to receive the parameter file (usually defined in 'AndroidManifest.xml').

  • Input the parameter file name and click the 'Commit' button.

Search and Upload the Parameter File:

  • On the 'Applications > Application page', select 'param' type and click the 'Search' button.

  • Choose the parameter file from the list.

  • Click the configuration icon, then select the 'Upload' button in the popup window.

  • Choose the file to upload and click 'Commit'.

Configure a Parameter File with a Template

  • Go to 'Templates > Prototype'. Click the + icon and choose group, input the name and other input area, including selecting the configuration file,then click Commit button

  • For 'Templates > Template', Click the + icon, input the name and other input area, select the configuration file created in the first step, create a new template and specify the app's package name that will accept the template parameter

  • Under 'Terminals > Terminal', select the serial number of the POS to push the template parameter to.

  • Select Config Application parameter icon in the bottom toolbox, in the popup window, click Add button in the left bottom, select the template parameter created and modify the value in the UI and push it like an app

How to Receive Parameter Files in the Application

  • First-Time Run Requirement: Upon the first installation of the application, ensure to run it at least once. This is necessary to register the broadcast receiver, which is crucial for receiving parameter files.

  • Update Trigger: After the initial run, the app doesn’t need to be actively running in the background. The trigger for receiving new parameters is activated by pushing the parameter file and then navigating on the terminal to: 'Settings > About POS > POS Configuration > Update now'.

Declare Permissions:

  • In your application's manifest file, declare the following permissions:

 android.permission.CLOUDPOS_PUSHSERVICE
 android.permission.CLOUDPOS_DOWNLOADRVICE

Register BroadcastReceiver:

  • Utilize an Android 'BroadcastReceiver' to receive notifications about pushed parameter files.

  • Note: Pay attention to the 'type' field in the pushed information, as it helps distinguish different types of third-party data being pushed to your application.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="your package name, which will configure in TMS package name area."

<!-- permission in manifest file-->
<uses-permission android:name="android.permission.CLOUDPOS_PUSHSERVICE" />
<uses-permission android:name="android.permission.CLOUDPOS_DOWNLOADRVICE" />

<!-- receiver in manifest file-->
<receiver
android:name="com.xxx.xxx.receiver.XXBroadcastReceiver">
    <intent-filter>
    	<action android:name="your package name" />
</intent-filter>
</receiver>

<!-- receiver snippet code-->
public class ParamFileReceiver extends BroadcastReceiver {
		
		private static final String MSG_TYPE_PARAM = "param:";
		@Override
		public void onReceive(Context context, Intent intent) {
			String notification = intent.getStringExtra("notification");
			if (notification != null
	&&MSG_TYPE_PARAM.equals(notification.subSequence(0,
MSG_TYPE_PARAM.length()))) {
				// remove unnecessary characters
				String fileName = notification
                                      .substring(MSG_TYPE_PARAM.length());
			}
		}
	}
}

Retrieve the Downloaded File:

  • Use the 'BroadcastReceiver' to obtain the name of the received parameter file.

  • Then, employ 'ContentResolver' to access the file stream and handle the file accordingly.

String URI_PARAM_FILE = "content://com.wizarpos.wizarviewagent.paramfilesprovider/file/";

Uri uri = Uri.parse(ParamFileProvider.URI_PARAM_FILE + fileName);
ContentResolver resolver = context.getContentResolver();
Reader reader = null;
try {
	reader = new InputStreamReader(resolver.openInputStream(uri));
} catch (FileNotFoundException e) {
e.printStackTrace();
}

Handling Distribution Results:

  • After processing the parameter file, communicate the results back to WizarView.

  • WizarView will then determine whether the parameter file distribution is complete. If it’s not marked as complete, WizarView may continue to push the file.

public static final String KEY_READED = "readed";
public static final String KEY_ERRLOG = "errlog";

String URI_PARAM_FILE = "content://com.wizarpos.wizarviewagent.paramfilesprovider/file/";

Uri uri = Uri.parse(ParamFileProvider.URI_PARAM_FILE + fileName);
ContentResolver resolver = context.getContentResolver();
ContentValues vaules = new ContentValues();

vaules.put("readed", true);
vaules.put("readed", false);
vaules.put("errlog", "Error in parameter information.Can not apply");

// give the result to the server
Uri resultUri = resolver.insert(uri, vaules);
if(resultUri == null){
	Log.e(APP_TAG, "param happen error , you need check log for modify this question!");
}

Demo Application:

Here is a example of the prototype, , in the prototype file, all type should be string, the others should change depends on your real requirement.

For a practical demonstration and further understanding, please download our . This sample will provide a clearer idea of the implementation.

testparam
complete project demo