|
|
(6 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
| == Why need counter mode ==
| | {{Migrating|https://smartpossdk.gitbook.io/cloudpossdk/faq/battery-power/understand-q3-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 ==
| |
| === 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.
| |
| * [http://ftp.wizarpos.com/advanceSDK/ChargeCounterOn-v30-release-q1_platform.apk APK to turn on Counter Mode]
| |
| * [http://ftp.wizarpos.com/advanceSDK/ChargeCounterOff-v30-release-q1_platform.apk APK to turn off Counter Mode]
| |
| === Change from TMS ===
| |
| * Steps:
| |
| # Add a new parameter file name in WizarView.
| |
| ## Click Applications > Application.
| |
| ## Click + icon in the left bottom of the tool box, popup an edit window.
| |
| ## In the edit window, write the name and other input area, then select type param.
| |
| ## Input the package name(com.wizarpos.system.settings) and parameter file name.
| |
| ## Click Commit button.
| |
| # Click Search button in the Applications>Application page.
| |
| # Select the parameter file name in the list.
| |
| # Select config icon in the right bottom of the tool box.
| |
| # Select Upload button in the popup window.
| |
| # 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.
| |
| [[File:3_upload_success.png]]
| |
| [[File:4_push_parm.png]]
| |
| | |
| * Parameter file sample:
| |
| 1. [http://ftp.wizarpos.com/advanceSDK/counter_true.xml paramter file to turn on Counter Mode]
| |
| 2. [http://ftp.wizarpos.com/advanceSDK/counter_false.xml parameter to turn off Counter Mode]
| |
| === Change From API ===
| |
| # Add Permission in AndroidManifest.xml - <uses-permission android:name="android.permission.CLOUDPOS_SET_BATTERY_COUNTER_MODE" />
| |
| # Get and put the [http://ftp.wizarpos.com/advanceSDK/ISystemExtApi.aidl AIDL file] to the package com.wizarpos.wizarviewagentassistant.aidl
| |
| # Code Sample:
| |
| <syntaxhighlight lang="java">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);
| |
| }</syntaxhighlight>
| |