Skip to content

Commit 00c3596

Browse files
WallaceSitWallaceSit
authored andcommitted
V2.8.22-5
V2.8.22-5: • App: add “debug enable” checkbox in setting-Admin page • App: remove some unused codes • Library108: add userDebugEnable parameter to control the display of the Toast message due to error in sending notification(A00X), controller(B00X), bluetooth(C00X) data. • Library108: handle the no result data for the “Authenticated Read” in Impinj configuration page • App, Library108: Combine CMD_18K6CAUTHENTICATE and CMD_AUTHENTICATE as CMD_18K6CAUTHENTICATE • Library108: rename some codes V2.8.21-4: • App: correct there is null at the beginning and end of EPC during wedge V2.8.20-4: • App: modify the impinj layout xml to cope with the exception in Samsung Galaxy S8 and Galaxy S21 Ultra phone V2.8.19-4: • App: replace “Multi-bank inventory” to “Register Tag” in Special function page V2.8.18-4: • App: add pop up window to show “Please power cycle reader and also this application” after “reset to default setting” • App: add procedure to update reader name after “reset to default setting” • Library108: add reader name “CS108ReaderXXXXXX” as one of the default setting parameters, where XXXXXX are the last 6 hex numbers of the Bluetooth MAC address. V2.8.17-3: • App: change the graphic display back to text display in main page • App: add share function in barcode inventory page V2.8.16-3: • App: relocate some codes, remove some unused codes • App: update from App v8.15 o App: solve “After inventory start, stop and start again, same tag EPC appear many time” problem o App: solve “can’t write EPC on read/write page” problem o App: solve “read barcode can’t clear” problem o App: change the text display to graphic display in main page o App: move HostCommands, HostCmdResponseTypes, Rx000pkgData, Cs108ScanData from Cs108Library4A.Cs108Connector to Cs108Library4A o App: revise accessTask error message o App: reduce the retry count when access failure to speed up the response time o App: revise custom keyboard service with possible prefix/suffix/delimiter o App: add ImpinJ 775 and AutoTune handling o App: add “CS108 Reader” during scanning cs108 readers o App: revise the Asygn, ImpinJ, simpleInventory pages o App: change the channel number to frequency channel selection in Settings->Operation page o App: revise the tigger detection frequency to a fixed value o App: improve possible “unnecessary reconnect display” o App: remove the “English US” display in customer “CS108 Java Wedge” during keyboard selection o App: add debug message to help debug “possible auto stop inventory” problem o App: relocate some codes, remove some unused codes, rename some codes, revise debug messages • Library108: update from Library108 v8.3 o Library108: add new function call to get the list of frequency value for the frequency selection in fixed channel o Library108: add new function to decode the temperature of the Asygn tag o Library108: add protection codes when the reader name is null o Library108: move HostCommands, HostCmdResponseTypes, Rx000pkgData, Cs108ScanData from Cs108Library4A.Cs108Connector to Cs108Library4A o Library108: relocate some codes, remove some unused codes, revise debug messages V2.8.5-1: • App: add “asygn” and “Simple Inventory” pages • App: remove the “dwelltime=0” condition when setting vibration • App: add android version check before getting phone mac which is restricted for android 13 or above • App: revise impinj page to include m775 and autoTune tag handling • App: solve additional display when “Read” in “Register tag” page after doing read in “Read/Write” page • App: add rssi sorting in different inventory pages • App: add FastId parameter setting in SetttingOperate page • App: relocate some codes, rename some code name • Library: add fastId related process handling • Library: add dummy getIntraPkDelay, setIntraPkDelay, getDupDelay, setDupDelay, get98xx routines which are new commands in Combo software. • Library: add setAuthenticateConfigration and related handling • Library: remove unused codes, relocate some codes • Library: ignore checking countryCode if rfid failure when reading model code • Both: add permission check before scanning, connect and other ble related controls • Both: revise debug messages V2.7.2-4: • In common page, check if Bluetooth is disconnected from connected, pop up message to request reconnect bluetooth • In common page, check if rfid link is considered failure or not, pop up message to request to disconnect bluetooth • In common page, check if battery status is not received within 5 seconds, send battery level request to test the bluetooth connection • When going to home page, stop further initialization if bluetooth is disconnected or rfid link is considered failure to shorten wait time • In inventory page, avoid stopping inventory when inventory start is still under data initialization. When inventory stop is still under initialization, inventory cannot starts. • Stop inventory: adding the condition when rfid link failure is found and when abort return is received • During inventory, if inventory stoppage is due to trigger key released, no immediate inventory stop. But wait 2 seconds for the possible abort return. After 2 seconds timeout, stop inventory by sending abort command • Library: no intentionally bluetooth disconnect when there is bluetooth data sending error or retry timeout. So that we can distinguish between data error and bluetooth disconnection. • Library: clear the data-to-be-sent rfid / barcode data queue if there is rfid / barcode data sending failure. This avoids subsequent data sending which waste time and prepares for popup • Library: shorten the 8002 response wait time from 200ms to 60ms • Library: shorten data retry count from 20 to 4 to shorten failure timeout for all rfid data including rifid_on and rfid_off. The 8100 response wait time is already 500ms. • Library: when data retry count out, avoid the toast message “Problem in sending commands to RFID module. Bluetooth Disconnect” to prepare popup request • Library: add getting / setting / getting AutoRfidAbortStatus before inventory to ensure AutoRfidAbort feature is enabled. • Library: add getting / setting R2000 0x201 to ensure bit 9 is enabled. • Library: set CustomAlertDialog as public to allow application to use this class to popup messages • Library: avoid battery request during inventorying even though no battery status is received. • Both: Revise debug messages, Relocate codes V2.7.1-3: • Revise the ordering of the menu items and special page items. • Add “Led Tag” page • Remove some unused codes • Library: add Vietnam1, Vietnam2, Vietnam3 o Vietnam1 -1 country code 866 – 868 MHz Fixed Frequencies 3 Channels 3900 msec 100 msec 866.3 MHz, 866.9 MHz, 867.5 MHz o Vietnam2 -7 country code 918 – 923 MHz Hopping 8 Channels 400 msec 500 KHz 918.75, 919.25, 919.75, 920.25, 920.75, 921.25, 921.75, 922.25 o Vietnam3 -7 country code 920 - 923 MHz Hopping 4 Channels 400 msec 500 KHz 920.75, 921.25, 921.75, 922.25 • Both: Revise debug messages. • Both: Relocate codes V2.7.0-2: • Library: Correct the version check of “Notification Auto Trigger Report” from Bluetooth version to SiliconLab version • Library: Correct the additional notification command display after showing “Problem in sending data to Notification Module….” V2.7.0-1: • Library: Add notification command output in the debug screen • Library: add the notification command display after showing “Problem in sending data to Notification Module….”
1 parent e1986e2 commit 00c3596

File tree

171 files changed

+6848
-2368
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

171 files changed

+6848
-2368
lines changed

app/build.gradle

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 31
4+
compileSdkVersion 33
55
defaultConfig {
66
applicationId "com.csl.cs108ademoapp"
77
minSdkVersion 19
8-
targetSdkVersion 31
8+
targetSdkVersion 33
99
versionCode 38
10-
versionName "2.7.0"
10+
versionName "2.8.22"
1111
}
1212
}
1313

1414
dependencies {
1515
implementation fileTree(include: ['*.jar'], dir: 'libs')
1616
implementation project(':cs108library4a')
17-
implementation 'com.google.android.material:material:1.0.0'
17+
implementation 'com.google.android.material:material:1.9.0'
1818
}
Binary file not shown.

app/release/output-metadata.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"version": 3,
3+
"artifactType": {
4+
"type": "APK",
5+
"kind": "Directory"
6+
},
7+
"applicationId": "com.csl.cs108ademoapp",
8+
"variantName": "release",
9+
"elements": [
10+
{
11+
"type": "SINGLE",
12+
"filters": [],
13+
"attributes": [],
14+
"versionCode": 38,
15+
"versionName": "2.8.22",
16+
"outputFile": "app-release.apk"
17+
}
18+
],
19+
"elementType": "File"
20+
}

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<uses-permission android:name="android.permission.INTERNET" />
77
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
88
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
9+
<uses-permission android:name="android.permission.STORAGE" />
10+
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
911
<uses-permission android:name="android.permission.NFC" />
1012

1113
<application
15.1 KB
Loading

app/src/main/java/com/csl/cs108ademoapp/AccessTask.java

Lines changed: 59 additions & 53 deletions
Large diffs are not rendered by default.

app/src/main/java/com/csl/cs108ademoapp/AccessTask1.java

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import android.widget.Button;
55
import android.widget.Toast;
66

7-
import com.csl.cs108library4a.Cs108Connector;
7+
import com.csl.cs108library4a.Cs108Library4A;
88

99
public class AccessTask1 {
1010
Button button;
@@ -14,25 +14,25 @@ public class AccessTask1 {
1414
int selectBank, selectOffset;
1515
String strPassword;
1616
int powerLevel;
17-
Cs108Connector.HostCommands hostCommand;
17+
Cs108Library4A.HostCommands hostCommand;
1818
Runnable updateRunnable = null;
1919

2020
AccessTask accessTask;
2121
public AccessTask1(Button button, boolean invalidRequest,
2222
int accBank, int accOffset, int accSize, int accBlockCount, String accWriteData,
23-
String selectMask, int selectBank, int selectOffset,
24-
String strPassword, int powerLevel, Cs108Connector.HostCommands hostCommand, Runnable updateRunnable) {
23+
String selectMask, int selectBank, int selectOffset,
24+
String strPassword, int powerLevel, Cs108Library4A.HostCommands hostCommand, Runnable updateRunnable) {
2525
this.button = button;
2626
this.invalidRequest = invalidRequest;
27-
MainActivity.mCs108Library4a.appendToLog("HelloK: invalidRequest=" + invalidRequest);
27+
MainActivity.csLibrary4A.appendToLog("HelloK: invalidRequest=" + invalidRequest);
2828
this.accBank = accBank;
2929
this.accOffset = accOffset;
30-
if (hostCommand == Cs108Connector.HostCommands.CMD_18K6CWRITE) { if (accBlockCount > 16) accBlockCount = 16; }
30+
if (hostCommand == Cs108Library4A.HostCommands.CMD_18K6CWRITE) { if (accBlockCount > 16) accBlockCount = 16; }
3131
else if (accBlockCount > 255) accBlockCount = 255;
3232
this.accBlockCount = accBlockCount;
3333
if (accWriteData == null) accWriteData = "";
34-
if (hostCommand == Cs108Connector.HostCommands.CMD_18K6CWRITE) {
35-
MainActivity.mCs108Library4a.appendToLog("strOut: accWriteData=" + accWriteData);
34+
if (hostCommand == Cs108Library4A.HostCommands.CMD_18K6CWRITE) {
35+
MainActivity.csLibrary4A.appendToLog("strOut: accWriteData=" + accWriteData);
3636
accWriteData = deformatWriteAccessData(accWriteData);
3737
if (accWriteData.length() < accSize * 4) {
3838
accSize = accWriteData.length()/4;
@@ -52,7 +52,7 @@ public AccessTask1(Button button, boolean invalidRequest,
5252
this.powerLevel = powerLevel;
5353
this.hostCommand = hostCommand;
5454
this.updateRunnable = updateRunnable;
55-
MainActivity.mCs108Library4a.appendToLog("HelloA, AccessTask1");
55+
MainActivity.csLibrary4A.appendToLog("HelloA, AccessTask1");
5656
CustomMediaPlayer playerN = MainActivity.sharedObjects.playerN;
5757
playerN.start();
5858
setup();
@@ -73,30 +73,30 @@ public AsyncTask.Status getStatus() {
7373
}
7474

7575
public String deformatWriteAccessData(String strIn) {
76-
MainActivity.mCs108Library4a.appendToLog("strOut: strIn=" + strIn);
76+
MainActivity.csLibrary4A.appendToLog("strOut: strIn=" + strIn);
7777
String strOut = strIn.replaceAll("\\P{Print}", "");
78-
MainActivity.mCs108Library4a.appendToLog("strOut=" + strOut);
78+
MainActivity.csLibrary4A.appendToLog("strOut=" + strOut);
7979
while (strOut.indexOf(":") > 0) {
8080
int index = strOut.indexOf(":");
8181
String writeDataTemp = "";
8282
if (index > 4) writeDataTemp = strOut.substring(0, index - 3);
8383
writeDataTemp += strOut.substring(index + 1);
8484
strOut = writeDataTemp;
85-
MainActivity.mCs108Library4a.appendToLog("strOut=" + strOut);
85+
MainActivity.csLibrary4A.appendToLog("strOut=" + strOut);
8686
}
87-
MainActivity.mCs108Library4a.appendToLog("strOut=" + strOut);
87+
MainActivity.csLibrary4A.appendToLog("strOut=" + strOut);
8888
return strOut;
8989
}
9090

91-
boolean isResultReady = false; int tryCount = 0, tryCountMax = 20;
91+
boolean isResultReady = false; int tryCount = 0, tryCountMax = 3;
9292
public boolean isResultReady() {
9393
boolean bValue = false;
9494
if (accessTask == null) { }
9595
else if (accessTask.getStatus() != AsyncTask.Status.FINISHED) { }
9696
else if (button.getText().toString().indexOf("ING") > 0) { }
9797
else if (isResultReady == false) {
9898
String strAccessResult = "";
99-
if (hostCommand != Cs108Connector.HostCommands.CMD_18K6CREAD || accBank != 3) strAccessResult = accessTask.accessResult;
99+
if (hostCommand != Cs108Library4A.HostCommands.CMD_18K6CREAD || accBank != 3) strAccessResult = accessTask.accessResult;
100100
else {
101101
int word4line = 7;
102102
for (int i = 0; i < accSizeNow; i=i+word4line) {
@@ -112,13 +112,13 @@ else if (isResultReady == false) {
112112
strAccessResult += accessTask.accessResult.substring(i * 4, (i + word4line) * 4);
113113
}
114114
strAccessResult += "\n";
115-
MainActivity.mCs108Library4a.appendToLog("i=" + i + ", formatted accessTask.accessResult=" + strAccessResult);
115+
MainActivity.csLibrary4A.appendToLog("i=" + i + ", formatted accessTask.accessResult=" + strAccessResult);
116116
}
117117
}
118118
if (accessResult == null) accessResult = strAccessResult;
119119
else accessResult += strAccessResult;
120120

121-
MainActivity.mCs108Library4a.appendToLog("HelloA: accessResult=" + accessTask.accessResult);
121+
MainActivity.csLibrary4A.appendToLog("HelloA: accessResult=" + accessTask.accessResult);
122122
if (accessTask.accessResult != null && accSizeNow >= accSize) {
123123
bValue = true;
124124
Toast.makeText(MainActivity.mContext, R.string.toast_abort_by_SUCCESS, Toast.LENGTH_SHORT).show();
@@ -129,21 +129,22 @@ else if (isResultReady == false) {
129129
accSize -= accSizeNow;
130130
if (accWriteData != null) { if (accWriteData.length() >= accSizeNow*4) accWriteData = accWriteData.substring(accSizeNow*4); }
131131
tryCount = 0;
132-
} else MainActivity.mCs108Library4a.appendToLog("HelloA: Going to retry with TryCount=" + tryCount);
132+
}
133+
MainActivity.csLibrary4A.appendToLog("HelloA: Going to retry with TryCount=" + tryCount + ", resultError = " + accessTask.resultError);
133134
if (tryCount < tryCountMax) {
134-
MainActivity.mCs108Library4a.appendToLog("HelloA: re-setup");
135+
MainActivity.csLibrary4A.appendToLog("HelloA: re-setup");
135136
setup();
136137
execute();
137138
} else bValue = true;
138139
}
139140
} else bValue = true;
140-
MainActivity.mCs108Library4a.appendToLog("HelloA: bValue=" + bValue);
141+
//MainActivity.csLibrary4A.appendToLog("HelloA: bValue=" + bValue);
141142
isResultReady = bValue;
142143
return bValue;
143144
}
144145
public String accessResult;
145146
public String getResult() {
146-
MainActivity.mCs108Library4a.appendToLog("HelloA: accessResult=" + accessResult);
147+
MainActivity.csLibrary4A.appendToLog("HelloA: accessResult=" + accessResult);
147148
if (accessTask == null) return null;
148149
if (accessTask.getStatus() != AsyncTask.Status.FINISHED) return null;
149150
if (button.getText().toString().indexOf("ING") > 0) return null;
@@ -153,39 +154,39 @@ public String getResult() {
153154
void setup() {
154155
tryCount++;
155156
if (invalidRequest == false) {
156-
if (MainActivity.mCs108Library4a.setAccessBank(accBank) == false) {
157-
MainActivity.mCs108Library4a.appendToLog("HelloK: accBank, invalidRequest=" + invalidRequest);
157+
if (MainActivity.csLibrary4A.setAccessBank(accBank) == false) {
158+
MainActivity.csLibrary4A.appendToLog("HelloK: accBank, invalidRequest=" + invalidRequest);
158159
invalidRequest = true;
159160
}
160161
}
161162
if (invalidRequest == false) {
162-
if (MainActivity.mCs108Library4a.setAccessOffset(accOffset) == false) {
163-
MainActivity.mCs108Library4a.appendToLog("HelloK: accOffset, invalidRequest=" + invalidRequest);
163+
if (MainActivity.csLibrary4A.setAccessOffset(accOffset) == false) {
164+
MainActivity.csLibrary4A.appendToLog("HelloK: accOffset, invalidRequest=" + invalidRequest);
164165
invalidRequest = true;
165166
}
166167
}
167168
if (invalidRequest == false) {
168169
if (accSize == 0) {
169-
MainActivity.mCs108Library4a.appendToLog("HelloK: accSize0, invalidRequest=" + invalidRequest);
170+
MainActivity.csLibrary4A.appendToLog("HelloK: accSize0, invalidRequest=" + invalidRequest);
170171
invalidRequest = true;
171172
} else {
172173
if (accSize > accBlockCount) accSizeNow = accBlockCount;
173174
else accSizeNow = accSize;
174-
MainActivity.mCs108Library4a.appendToLog("HelloA: accSize=" + accSize + ", accSizeNow=" + accSizeNow);
175-
if (MainActivity.mCs108Library4a.setAccessCount(accSizeNow) == false) {
175+
MainActivity.csLibrary4A.appendToLog("HelloA: accSize=" + accSize + ", accSizeNow=" + accSizeNow);
176+
if (MainActivity.csLibrary4A.setAccessCount(accSizeNow) == false) {
176177
invalidRequest = true;
177178
}
178179
}
179180
}
180-
if (invalidRequest == false && hostCommand == Cs108Connector.HostCommands.CMD_18K6CWRITE) {
181+
if (invalidRequest == false && hostCommand == Cs108Library4A.HostCommands.CMD_18K6CWRITE) {
181182
if (accWriteData.length() > accSizeNow * 4) accWriteDataNow = accWriteData.substring(0, accSizeNow*4);
182183
else accWriteDataNow = accWriteData;
183-
if (MainActivity.mCs108Library4a.setAccessWriteData(accWriteDataNow) == false) {
184+
if (MainActivity.csLibrary4A.setAccessWriteData(accWriteDataNow) == false) {
184185
invalidRequest = true;
185186
}
186187
}
187-
MainActivity.mCs108Library4a.appendToLog("HelloA: accOffset=" + accOffset + ", accSizeNow=" + accSizeNow + ", accSize=" + accSize);
188-
MainActivity.mCs108Library4a.appendToLog("HelloK: invalidRequest=" + invalidRequest);
188+
MainActivity.csLibrary4A.appendToLog("HelloA: accOffset=" + accOffset + ", accSizeNow=" + accSizeNow + ", accSize=" + accSize);
189+
MainActivity.csLibrary4A.appendToLog("HelloK: invalidRequest=" + invalidRequest);
189190
accessTask = new AccessTask(button, invalidRequest,
190191
selectMask, selectBank, selectOffset,
191192
strPassword, powerLevel, hostCommand, tryCount==tryCountMax, updateRunnable);

app/src/main/java/com/csl/cs108ademoapp/CustomIME.java

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package com.csl.cs108ademoapp;
22

33
import android.inputmethodservice.InputMethodService;
4+
import android.inputmethodservice.Keyboard;
5+
import android.inputmethodservice.KeyboardView;
46
import android.os.AsyncTask;
57
import android.os.Handler;
68
import android.provider.Settings;
@@ -14,9 +16,8 @@
1416

1517
import static android.content.ContentValues.TAG;
1618

17-
public class CustomIME extends InputMethodService {
19+
public class CustomIME extends InputMethodService { //implements KeyboardView.OnKeyboardActionListener {
1820
Handler mHandler = new Handler();
19-
boolean activittyActive = false;
2021

2122
@Override
2223
public void onCreate() {
@@ -25,10 +26,16 @@ public void onCreate() {
2526
}
2627
@Override
2728
public View onCreateInputView() {
28-
super.onCreateInputView();
29-
appendToLog("CustomIME.onCreateInputView()");
29+
super.onCreateInputView();;
3030
mHandler.post(serviceRunnable);
31-
return null;
31+
KeyboardView keyboardView = null;
32+
if (false) {
33+
keyboardView = (KeyboardView) getLayoutInflater().inflate(R.layout.keyboard_view, null);
34+
Keyboard keyboard = new Keyboard(this, R.xml.number_pad);
35+
keyboardView.setKeyboard(keyboard);
36+
//keyboardView.setOnKeyboardActionListener(this);
37+
}
38+
return keyboardView;
3239
}
3340
@Override
3441
public void onDestroy() {
@@ -49,19 +56,19 @@ public void run() {
4956

5057
mHandler.postDelayed(serviceRunnable, 1000);
5158
if (MainActivity.sharedObjects == null) return;
52-
if (MainActivity.mCs108Library4a == null) return;
59+
if (MainActivity.csLibrary4A == null) return;
5360

5461
if (inventoring == false) { MainActivity.sharedObjects.serviceArrayList.clear(); epcArrayList.clear(); }
5562
if (MainActivity.mContext == null) return;
56-
appendToLog("CustomIME Debug 1");
57-
if (MainActivity.activityActive == false && MainActivity.wedged && MainActivity.mCs108Library4a.isBleConnected()) {
58-
if (MainActivity.mCs108Library4a.getTriggerButtonStatus() == false) {
63+
appendToLog("CustomIME Debug 1 with activityActive = " + MainActivity.activityActive + ", wedged = " + MainActivity.wedged + ", isBleConnected = " + MainActivity.csLibrary4A.isBleConnected());
64+
if (MainActivity.activityActive == false /*&& MainActivity.wedged*/ && MainActivity.csLibrary4A.isBleConnected()) {
65+
if (MainActivity.csLibrary4A.getTriggerButtonStatus() == false) {
5966
appendToLog("CustomIME Debug 2");
6067
startStopHandler();
6168
inventoring = false;
6269
} else if (inventoring == false) {
6370
appendToLog("CustomIME Debug 3");
64-
if (MainActivity.sharedObjects.runningInventoryRfidTask == false && MainActivity.sharedObjects.runningInventoryBarcodeTask == false && MainActivity.mCs108Library4a.mrfidToWriteSize() == 0) {
71+
if (MainActivity.sharedObjects.runningInventoryRfidTask == false && MainActivity.sharedObjects.runningInventoryBarcodeTask == false && MainActivity.csLibrary4A.mrfidToWriteSize() == 0) {
6572
startStopHandler();
6673
inventoring = true;
6774
}
@@ -79,7 +86,25 @@ public void run() {
7986
if (matched == false && strEpc != null) {
8087
epcArrayList.add(strEpc);
8188
InputConnection ic = getCurrentInputConnection();
82-
ic.commitText(strEpc + "\n", 1);
89+
strEpc = (MainActivity.wedgePrefix != null ? MainActivity.wedgePrefix : "") + strEpc
90+
+ (MainActivity.wedgeSuffix != null ? MainActivity.wedgeSuffix : "");
91+
switch (MainActivity.wedgeDelimiter) {
92+
default:
93+
strEpc += "\n";
94+
break;
95+
case 0x09:
96+
strEpc += "\t";
97+
break;
98+
case 0x2C:
99+
strEpc += ",";
100+
break;
101+
case 0x20:
102+
strEpc += " ";
103+
break;
104+
case -1:
105+
break;
106+
}
107+
ic.commitText(strEpc, 1);
83108
}
84109
}
85110
}
@@ -96,10 +121,10 @@ void startStopHandler() {
96121
if (inventoryRfidTask.getStatus() == AsyncTask.Status.RUNNING) started = true;
97122
}
98123
appendToLog("CustomIME Debug 10");
99-
if ((started && MainActivity.mCs108Library4a.getTriggerButtonStatus()) || (started == false && MainActivity.mCs108Library4a.getTriggerButtonStatus() == false)) return;
124+
if ((started && MainActivity.csLibrary4A.getTriggerButtonStatus()) || (started == false && MainActivity.csLibrary4A.getTriggerButtonStatus() == false)) return;
100125
if (started == false) {
101126
appendToLog("CustomIME Debug 11");
102-
MainActivity.mCs108Library4a.startOperation(Cs108Library4A.OperationTypes.TAG_INVENTORY);
127+
MainActivity.csLibrary4A.startOperation(Cs108Library4A.OperationTypes.TAG_INVENTORY);
103128
inventoryRfidTask = new InventoryRfidTask();
104129
inventoryRfidTask.execute();
105130
}

app/src/main/java/com/csl/cs108ademoapp/CustomMediaPlayer.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ public CustomMediaPlayer(Context context, String file) {
2424
@Override
2525
public void onCompletion(MediaPlayer mp) {
2626
starting = false;
27-
if (DEBUG) MainActivity.mCs108Library4a.appendToLog("MediaPlayer is completed.");
27+
if (DEBUG) MainActivity.csLibrary4A.appendToLog("MediaPlayer is completed.");
2828
}
2929
});
3030
} catch (IOException e) {
31-
MainActivity.mCs108Library4a.appendToLog("mp3 setup FAIL");
31+
MainActivity.csLibrary4A.appendToLog("mp3 setup FAIL");
3232
}
3333
}
3434

@@ -48,7 +48,7 @@ void setVolume(int volume1, int volume2) {
4848
AudioManager audioManager = ((AudioManager) context.getSystemService(Context.AUDIO_SERVICE));
4949
int iVolumeMax = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
5050
int currentVolume = audioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
51-
MainActivity.mCs108Library4a.appendToLog("Hello8: currentVolume = " + currentVolume);
51+
MainActivity.csLibrary4A.appendToLog("Hello8: currentVolume = " + currentVolume);
5252
if (currentVolume > 0) {
5353
int volume12 = volume1 + volume2;
5454
volume12 = ( volume12 * iVolumeMax ) / 600;

0 commit comments

Comments
 (0)