How to Understand the Counter Mode Functionality in the Q3 Terminal

From wizarPOS

Why need counter mode

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. 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%.

How to change counter mode

 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.

Change manually in terminal

  • Click Settings> Administrator Login
  • Click Setting>Battery, turn on/off Counter Mode

Change by APK

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.

Change from TMS

  • Steps:
  1. Add a new parameter file name in WizarView.
    1. Click Applications > Application.
    2. Click + icon in the left bottom of the tool box, popup an edit window.
    3. In the edit window, write the name and other input area, then select type param.
    4. Input the package name(com.wizarpos.system.settings) and parameter file name.
    5. Click Commit button.
  2. Click Search button in the Applications>Application page.
  3. Select the parameter file name in the list.
  4. Select config icon in the right bottom of the tool box.
  5. Select Upload button in the popup window.
  6. Choose the upload file, then click Commit button.

The parameter file has configured in WizarView now. The push file process is the same as the push application process. 3 upload success.png 4 push parm.png

  • Parameter file sample:
1. paramter file to turn on Counter Mode
2. parameter to turn off Counter Mode

Change From API

  1. Add Permission in AndroidManifest.xml - <uses-permission android:name="android.permission.CLOUDPOS_SET_BATTERY_COUNTER_MODE" />
  2. Get and put the AIDL file to the package com.wizarpos.wizarviewagentassistant.aidl
  3. Code Sample:
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);
}