How to Understand the Counter Mode Functionality in the Q3 Terminal: Difference between revisions

From wizarPOS
No edit summary
Line 1: Line 1:
== Why need counter mode ==
== Why Counter Mode is Necessary: ==
Q3 use a soft battery. If it is fully charged for a long time and continuously charged, it is prone to bulge.Therefore, the charging mechanism needs to be adjusted by software to prevent the battery from being fully charged for a long time.
* The Q3 terminal utilizes a soft battery.
In order to protect the battery, please use the counter mode when the charger always connect to terminal. In counter mode, the battery is recharged at 15%, otherwise recharged at 95%.
* Continuous charging, especially when the battery is already fully charged, can lead to battery bulging.
== How to change counter mode ==
* To mitigate this risk, software adjustments are made to the charging mechanism.
 
* Counter Mode is essential when the charger is constantly connected to the terminal.
  To force into counter mode, please installed the apks. See [Change by APK]. The other ways, will depend on the auto-counter mode algorithm in the terminal.
* In Counter Mode, the battery recharges at 15% (rather than the usual 95%) to avoid long-term full charge.
=== Change manually in terminal ===
== How to Activate Counter Mode: ==
* Click Settings> Administrator Login
There is the auto-counter mode algorithm in the Q3 terminal.
* Click Setting>Battery, turn on/off Counter Mode
=== Manual Activation in Terminal Settings: ===
=== Change by APK ===
* Navigate to Settings > Administrator Login.
Install the follow apk, after install, it will run and set the counter mode automatically, it has no app icon show in launcher desktop. The new updated apk, will disable the auto-counter mode algorithm, let the terminal enter to counter mode unconditionally.
* Go to Setting > Battery.
* [http://ftp.wizarpos.com/advanceSDK/ChargeCounter-release-v3.0.2_counter_on-r20230823172106-q1_platform.apk APK to turn on Counter Mode(updated 8/28/2023)]
* Toggle Counter Mode on or off as needed.
* [http://ftp.wizarpos.com/advanceSDK/ChargeCounter-release-v3.0.2_counter_off-r20230823164102-q1_platform.apk APK to turn off Counter Mode(updated 8/28/2023)]
=== Activation via APK Installation: ===
 
* Install the specific APK to automatically set the terminal to Counter Mode.
=== Change from TMS ===
* This APK disables the auto-counter mode algorithm, allowing for unconditional Counter Mode activation.
* Steps:
* No app icon is displayed on the launcher desktop.
# Add a new parameter file name in WizarView.
* Two versions of the APK are available: one to turn on Counter Mode, and another to turn it off (both updated as of 8/28/2023).
## Click Applications > Application.
** [http://ftp.wizarpos.com/advanceSDK/ChargeCounter-release-v3.0.2_counter_on-r20230823172106-q1_platform.apk APK to turn on Counter Mode(updated 8/28/2023)]
## Click + icon in the left bottom of the tool box, popup an edit window.
** [http://ftp.wizarpos.com/advanceSDK/ChargeCounter-release-v3.0.2_counter_off-r20230823164102-q1_platform.apk APK to turn off Counter Mode(updated 8/28/2023)]
## In the edit window, write the name and other input area, then select type param.
=== Activation via TMS (Terminal Management System): ===
## Input the package name(com.wizarpos.system.settings) and parameter file name.
* Add a new parameter file in WizarView. Follow steps in the WizarView application to upload and commit the parameter file.
## Click Commit button.
** '''Access Application Settings:'''
# Click Search button in the Applications>Application page.
*** Navigate to the 'Applications' section, and then select 'Application' from the submenu.
# Select the parameter file name in the list.
** '''Add New Parameter File:'''
# Select config icon in the right bottom of the tool box.
*** Click the '+' icon located at the bottom left of the toolbox. This will open an edit window.
# Select Upload button in the popup window.
*** In the edit window, fill in the required fields, including the name of the parameter file.
# Choose the upload file, then click Commit button.
*** Ensure to select 'param' as the type.
The parameter file has configured in WizarView now.
*** Enter the package name, which should be 'com.wizarpos.system.settings', and then the name of your parameter file.
The push file process is the same as the push application process.
*** After entering all the details, click the 'Commit' button to save this entry.
** '''Locate the New Parameter File:'''
*** Now, click the 'Search' button in the 'Applications > Application' page.
*** From the displayed list, select the parameter file you just added.
** '''Configure the Parameter File:'''
*** Click the configuration (config) icon located at the right bottom of the toolbox.
*** In the popup window, click the 'Upload' button.
** '''Upload the Parameter File:'''
*** Choose the appropriate parameter file from your device.
*** Once selected, click the 'Commit' button to upload the file to the system.
* This allows the configuration of the terminal remotely via file push, similar to application updates.
[[File:3_upload_success.png]]
[[File:3_upload_success.png]]
[[File:4_push_parm.png]]
[[File:4_push_parm.png]]
 
* Parameter files are available to turn on or off Counter Mode.
* Parameter file sample:
** [http://ftp.wizarpos.com/advanceSDK/counter_true.xml Sample paramter file to turn on Counter Mode]
1. [http://ftp.wizarpos.com/advanceSDK/counter_true.xml paramter file to turn on Counter Mode]
** [http://ftp.wizarpos.com/advanceSDK/counter_false.xml Sample parameter file to turn off Counter Mode]
2. [http://ftp.wizarpos.com/advanceSDK/counter_false.xml parameter to turn off Counter Mode]
=== Activation through API (Application Programming Interface): ===
=== Change From API ===
* Add the required permission, ''''<uses-permission android:name="android.permission.CLOUDPOS_SET_BATTERY_COUNTER_MODE" />'''' in ''''AndroidManifest.xml''''.
# Add Permission in AndroidManifest.xml - <uses-permission android:name="android.permission.CLOUDPOS_SET_BATTERY_COUNTER_MODE" />
* Utilize the [http://ftp.wizarpos.com/advanceSDK/ISystemExtApi.aidl AIDL file] in the package ''''com.wizarpos.wizarviewagentassistant.aidl''''.
# Get and put the [http://ftp.wizarpos.com/advanceSDK/ISystemExtApi.aidl AIDL file] to the package com.wizarpos.wizarviewagentassistant.aidl
* A code sample can be provided for this purpose.
# Code Sample:
<syntaxhighlight lang="java">public void systemExtApiService_setBatteryCounterMode(Context context, boolean enable) {
<syntaxhighlight lang="java">public void systemExtApiService_setBatteryCounterMode(Context context, boolean enable) {
     ServiceConnection systemExtConn = new ServiceConnection() {
     ServiceConnection systemExtConn = new ServiceConnection() {
Line 61: Line 70:
     context.startService(intent);
     context.startService(intent);
}</syntaxhighlight>
}</syntaxhighlight>
By using Counter Mode in the appropriate situations, the lifespan and health of the Q3 terminal's battery can be significantly enhanced.

Revision as of 18:07, 3 January 2024

Why Counter Mode is Necessary:

  • The Q3 terminal utilizes a soft battery.
  • Continuous charging, especially when the battery is already fully charged, can lead to battery bulging.
  • To mitigate this risk, software adjustments are made to the charging mechanism.
  • Counter Mode is essential when the charger is constantly connected to the terminal.
  • In Counter Mode, the battery recharges at 15% (rather than the usual 95%) to avoid long-term full charge.

How to Activate Counter Mode:

There is the auto-counter mode algorithm in the Q3 terminal.

Manual Activation in Terminal Settings:

  • Navigate to Settings > Administrator Login.
  • Go to Setting > Battery.
  • Toggle Counter Mode on or off as needed.

Activation via APK Installation:

Activation via TMS (Terminal Management System):

  • Add a new parameter file in WizarView. Follow steps in the WizarView application to upload and commit the parameter file.
    • Access Application Settings:
      • Navigate to the 'Applications' section, and then select 'Application' from the submenu.
    • Add New Parameter File:
      • Click the '+' icon located at the bottom left of the toolbox. This will open an edit window.
      • In the edit window, fill in the required fields, including the name of the parameter file.
      • Ensure to select 'param' as the type.
      • Enter the package name, which should be 'com.wizarpos.system.settings', and then the name of your parameter file.
      • After entering all the details, click the 'Commit' button to save this entry.
    • Locate the New Parameter File:
      • Now, click the 'Search' button in the 'Applications > Application' page.
      • From the displayed list, select the parameter file you just added.
    • Configure the Parameter File:
      • Click the configuration (config) icon located at the right bottom of the toolbox.
      • In the popup window, click the 'Upload' button.
    • Upload the Parameter File:
      • Choose the appropriate parameter file from your device.
      • Once selected, click the 'Commit' button to upload the file to the system.
  • This allows the configuration of the terminal remotely via file push, similar to application updates.

3 upload success.png 4 push parm.png

Activation through API (Application Programming Interface):

  • Add the required permission, '<uses-permission android:name="android.permission.CLOUDPOS_SET_BATTERY_COUNTER_MODE" />' in 'AndroidManifest.xml'.
  • Utilize the AIDL file in the package 'com.wizarpos.wizarviewagentassistant.aidl'.
  • A code sample can be provided for this purpose.
public void systemExtApiService_setBatteryCounterMode(Context context, boolean enable) {
    ServiceConnection systemExtConn = new ServiceConnection() {
        @Override
        public void onServiceConnected(ComponentName name, IBinder service) {
            ISystemExtApi systemExtApiService = ISystemExtApi.Stub.asInterface(service);
            Logger.debug("startAgentService = " + systemExtApiService);
            try {
                systemExtApiService.setBatteryCounterMode(enable);
            } catch (RemoteException e) {
                e.printStackTrace();
            }
        }

        @Override
        public void onServiceDisconnected(ComponentName name) {
        }
    };
    ComponentName comp = new ComponentName("com.wizarpos.wizarviewagentassistant","com.wizarpos.wizarviewagentassistant.SystemExtApiService");
    Intent intent = new Intent();
    intent.setComponent(comp);
    context.bindService(intent, systemExtConn, Context.BIND_AUTO_CREATE);
    context.startService(intent);
}

By using Counter Mode in the appropriate situations, the lifespan and health of the Q3 terminal's battery can be significantly enhanced.