diff --git a/app/release/20240527.apk b/app/release/20240527.apk
deleted file mode 100644
index 863136b..0000000
Binary files a/app/release/20240527.apk and /dev/null differ
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 46df7db..2423a0e 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -18,15 +18,14 @@
android:theme="@style/Theme.JinYuRFID"
android:usesCleartextTraffic="true"
tools:targetApi="31">
+
-
-
+ android:exported="true"/>
+
-
-
-
-
-
+
-
-
-
-
+
+
+
+
diff --git a/app/src/main/java/com/example/jinyu_rfid/AppLoginActivity.java b/app/src/main/java/com/example/jinyu_rfid/AppLoginActivity.java
index b84d7f2..26bcf35 100644
--- a/app/src/main/java/com/example/jinyu_rfid/AppLoginActivity.java
+++ b/app/src/main/java/com/example/jinyu_rfid/AppLoginActivity.java
@@ -19,10 +19,9 @@ import java.util.Locale;
public class AppLoginActivity extends AppCompatActivity {
private ActivityAppLoginBinding binding;
-
private Resources resources;
private Configuration config;
-
+ private Intent intent;
@Override
protected void onCreate(Bundle savedInstanceState) {
@@ -36,6 +35,8 @@ public class AppLoginActivity extends AppCompatActivity {
// 工作模式
var workmode = SharedPreferencesUtils.getInt("workmode", 0);
binding.mainWork.setSelection(workmode);
+
+ intent=new Intent(this, IPConfiguraActivity.class);
}
public void appLoginClick(View view) {
@@ -65,4 +66,8 @@ public class AppLoginActivity extends AppCompatActivity {
}
resources.updateConfiguration(config, resources.getDisplayMetrics());
}
+
+ public void ipCon(View view){
+ startActivity(intent);
+ }
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/jinyu_rfid/BlueToothServerActivity.java b/app/src/main/java/com/example/jinyu_rfid/BlueToothServerActivity.java
deleted file mode 100644
index 456f9d5..0000000
--- a/app/src/main/java/com/example/jinyu_rfid/BlueToothServerActivity.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package com.example.jinyu_rfid;
-
-import androidx.annotation.RequiresApi;
-import androidx.appcompat.app.AppCompatActivity;
-import androidx.core.app.ActivityCompat;
-
-import android.annotation.SuppressLint;
-import android.bluetooth.BluetoothAdapter;
-import android.bluetooth.BluetoothDevice;
-import android.bluetooth.BluetoothServerSocket;
-import android.bluetooth.BluetoothSocket;
-import android.content.pm.PackageManager;
-import android.os.Build;
-import android.os.Bundle;
-import android.os.Message;
-import android.util.Log;
-import android.widget.TextView;
-import android.widget.Toast;
-
-import org.w3c.dom.Text;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Set;
-import java.util.UUID;
-
-public class BlueToothServerActivity extends AppCompatActivity {
- private BluetoothServerSocket serverSocket;
- private BluetoothSocket socket;
- @RequiresApi(api = Build.VERSION_CODES.S)
- @SuppressLint("MissingInflatedId")
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_blue_tooth_server);
-
- // 0000110a-0000-1000-8000-00805f9b34fb
- BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
- if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.BLUETOOTH_CONNECT) != PackageManager.PERMISSION_GRANTED) {
- ActivityCompat.requestPermissions(this, new String[]{android.Manifest.permission.BLUETOOTH_CONNECT}, 1);
- }
- // Set devices = bluetoothAdapter.getBondedDevices();
- // D:for (BluetoothDevice bluetoothDevice : devices) {
- // Log.e("TAG", bluetoothDevice.getName() + ":" + bluetoothDevice.getUuids()[0].toString());
- // /* // if (bluetoothDevice.getAddress().toString().equals("FC:0F:E7:B6:15:2F")) {
- // if (bluetoothDevice.getName().equals("AUTOID UTouch")) {
- // mmDevice = bluetoothDevice;
- // Log.e("TAG", "连接成功");
- // break D;
- // }*/
- // }
- try {
- // 创建一个BluetoothServerSocket来监听连接请求
- serverSocket = bluetoothAdapter.listenUsingRfcommWithServiceRecord(
-
- "abc",
- UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"));
- // 无限循环以接受连接请求
- while (true) {
- socket = serverSocket.accept();
- // 接收数据
- receiveData(socket);
- // 关闭socket
- socket.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- private void receiveData(BluetoothSocket socket) {
- try {
- InputStream inputStream = socket.getInputStream();
- byte[] buffer = new byte[1024];
- int bytesRead;
- while ((bytesRead = inputStream.read(buffer)) != -1) {
- // 处理接收到的数据
- // (buffer, 0, bytesRead) 是接收到的数据
- String receivedData = new String(buffer, 0, bytesRead);
- Toast.makeText(this, receivedData, Toast.LENGTH_SHORT).show();
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- public void stopServer() {
- try {
- if (serverSocket != null) {
- serverSocket.close();
- }
- } catch (IOException e) {
- e.printStackTrace();
- }
- }
-
- @Override
- protected void onDestroy() {
- super.onDestroy();
- stopServer();
- }
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/jinyu_rfid/IPConfiguraActivity.java b/app/src/main/java/com/example/jinyu_rfid/IPConfiguraActivity.java
new file mode 100644
index 0000000..e45d715
--- /dev/null
+++ b/app/src/main/java/com/example/jinyu_rfid/IPConfiguraActivity.java
@@ -0,0 +1,46 @@
+package com.example.jinyu_rfid;
+
+import androidx.appcompat.app.AppCompatActivity;
+import androidx.databinding.DataBindingUtil;
+
+import android.os.Bundle;
+import android.util.Log;
+import android.view.View;
+
+import com.example.jinyu_rfid.base.BaseActivity;
+import com.example.jinyu_rfid.been.IPConfigurationVM;
+import com.example.jinyu_rfid.databinding.ActivityIpconfiguraBinding;
+import com.example.jinyu_rfid.uitls.SharedPreferencesUtils;
+
+public class IPConfiguraActivity extends BaseActivity {
+ private IPConfigurationVM vm;
+ private ActivityIpconfiguraBinding binding;
+ @Override
+ protected void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ binding = DataBindingUtil. setContentView(this,R.layout.activity_ipconfigura);
+
+ binding.setTitle(getString(R.string.activity_name_configuration));
+ }
+
+ @Override
+ protected void onResume() {
+ super.onResume();
+ if (url==null){
+ vm=new IPConfigurationVM();
+ }else {
+ vm=new IPConfigurationVM(url);
+ }
+ binding.setVm(vm);
+ }
+
+ public void urlSeve(View view) {
+
+ var ip = vm.getIp();
+ var port = vm.getPort();
+ if(ip==null||port==null||ip.isEmpty()|| port.isEmpty()) return;
+ SharedPreferencesUtils.putstring("url",vm.getUrl());
+ finish();
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/jinyu_rfid/MainActivity.java b/app/src/main/java/com/example/jinyu_rfid/MainActivity.java
index 359e391..e085a9f 100644
--- a/app/src/main/java/com/example/jinyu_rfid/MainActivity.java
+++ b/app/src/main/java/com/example/jinyu_rfid/MainActivity.java
@@ -39,7 +39,7 @@ public class MainActivity extends BaseActivity {
private Resources resources;
private Configuration config;
private int index;
-
+ private Intent intent;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@@ -59,6 +59,7 @@ public class MainActivity extends BaseActivity {
}
binding.setUser(loginVm);
+ intent=new Intent(this, IPConfiguraActivity.class);
}
@@ -92,7 +93,7 @@ public class MainActivity extends BaseActivity {
map.put("token", "123456");
map.put("Language", index + "");
if (pass == null || name == null || pass.isEmpty() || name.isEmpty()) return;
- OkGo.post(url + "/login")
+ OkGo.post("http://"+url + "/rfid/login")
.upRequestBody(RequestBody.create(JSON, gson.toJson(map)))
.execute(new MyRecultCall(dialog, this) {
@Override
@@ -129,4 +130,7 @@ public class MainActivity extends BaseActivity {
}
});
}
+ public void ipConMain(View view){
+ startActivity(intent);
+ }
}
diff --git a/app/src/main/java/com/example/jinyu_rfid/AutoIDReadActivity.java b/app/src/main/java/com/example/jinyu_rfid/Read2Activity.java
similarity index 81%
rename from app/src/main/java/com/example/jinyu_rfid/AutoIDReadActivity.java
rename to app/src/main/java/com/example/jinyu_rfid/Read2Activity.java
index bc19b13..ddf9e25 100644
--- a/app/src/main/java/com/example/jinyu_rfid/AutoIDReadActivity.java
+++ b/app/src/main/java/com/example/jinyu_rfid/Read2Activity.java
@@ -11,8 +11,7 @@ import com.example.jinyu_rfid.adapter.ResultAdapter;
import com.example.jinyu_rfid.base.BaseActivity;
import com.example.jinyu_rfid.been.ReadTyreNoResult;
import com.example.jinyu_rfid.callback.DataReturnCall;
-import com.example.jinyu_rfid.databinding.ActivityAutoidReadBinding;
-import com.example.jinyu_rfid.databinding.ActivityAutoidReadBindingImpl;
+import com.example.jinyu_rfid.databinding.ActivityRead2Binding;
import com.example.jinyu_rfid.databinding.ActivityReadBinding;
import com.example.jinyu_rfid.rfid.AutoID9UDevice;
import com.example.jinyu_rfid.rfid.RFIDModel;
@@ -21,18 +20,18 @@ import com.example.jinyu_rfid.uitls.ASCIIUtil;
import java.util.ArrayList;
import java.util.List;
-public class AutoIDReadActivity extends BaseActivity implements DataReturnCall {
+public class Read2Activity extends BaseActivity implements DataReturnCall {
private ResultAdapter adapter;
private RFIDModel rfidModel;
private String[] stringArray;
private List list;
- private ActivityAutoidReadBinding binding;
+ private ActivityRead2Binding binding;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- binding = DataBindingUtil.setContentView(this, R.layout.activity_autoid_read);
+ binding = DataBindingUtil.setContentView(this, R.layout.activity_read2);
binding.setTitle(getString(R.string.go_read));
adapter = new ResultAdapter(this);
list = new ArrayList<>(11);
@@ -47,11 +46,13 @@ public class AutoIDReadActivity extends BaseActivity implements DataReturnCall {
// 读取user区
- public void readInfo(View view) {
- rfidModel.sanUser(80);
+ public void read2Info(View view) {
+ var id = binding.writeEpcCode.getText().toString();
+ if (id.isEmpty()) return;
+ rfidModel.sanUser(80, id);
}
- public void readEPCInfo(View view) {
+ public void read2EPC(View view) {
rfidModel.sanEpc(6);
}
@@ -59,11 +60,9 @@ public class AutoIDReadActivity extends BaseActivity implements DataReturnCall {
@Override
public void readEpcCodeInfo(String info, boolean state, String stateInfo) {
if (state) {
- binding.readTextEpc.setText(info);
music.start();
- return;
}
- binding.readTextEpc.setText(null);
+ binding.writeEpcCode.setText(info);
}
@SuppressLint("NotifyDataSetChanged")
diff --git a/app/src/main/java/com/example/jinyu_rfid/ReadActivity.java b/app/src/main/java/com/example/jinyu_rfid/ReadActivity.java
index 19c1211..ff4aa26 100644
--- a/app/src/main/java/com/example/jinyu_rfid/ReadActivity.java
+++ b/app/src/main/java/com/example/jinyu_rfid/ReadActivity.java
@@ -64,8 +64,8 @@ public class ReadActivity extends BaseActivity implements DataReturnCall {
binding.setAdapter(adapter);
// 名称
stringArray = getResources().getStringArray(R.array.project_list);
- // rfidModel = new C5106Device(this,this);
- rfidModel=new AutoID9UDevice(this,this);
+ rfidModel = new C5106Device(this,this);
+ // rfidModel=new AutoID9UDevice(this,this);
}
@@ -94,10 +94,15 @@ public class ReadActivity extends BaseActivity implements DataReturnCall {
music.start();
String info = ASCIIUtil.hex2Str(user);
Log.e("TAG", "readUserInfo:" + user);
- var infos = info.split("~");
- for (int i = 0; i < 12; i++) {
- list.add(new ReadTyreNoResult(i, stringArray[i], infos[i]));
+ try {
+ var infos = info.split("~");
+ for (int i = 0; i < 12; i++) {
+ list.add(new ReadTyreNoResult(i, stringArray[i], infos[i]));
+ }
+ }catch (Exception e){
+ Toast.makeText(context, getString(R.string.activity_name_configuration), Toast.LENGTH_SHORT).show();
}
+
} else {
binding.readText.setText(null);
}
diff --git a/app/src/main/java/com/example/jinyu_rfid/ReadBlueToothActivity.java b/app/src/main/java/com/example/jinyu_rfid/ReadBlueToothActivity.java
index ba674f9..7cc3456 100644
--- a/app/src/main/java/com/example/jinyu_rfid/ReadBlueToothActivity.java
+++ b/app/src/main/java/com/example/jinyu_rfid/ReadBlueToothActivity.java
@@ -234,7 +234,7 @@ public class ReadBlueToothActivity extends BaseActivity {
map.put("EpcCode", info);
map.put("token", "123456");
map.put("Language", SharedPreferencesUtils.getstring("languageIndex", "0"));
- OkGo.post(url + "/readEPCCode")
+ OkGo.post("http://"+url + "/rfid/readEPCCode")
.upRequestBody(RequestBody.create(JSON, gson.toJson(map)))
.execute(new MyRecultCall(dialog, this) {
@Override
diff --git a/app/src/main/java/com/example/jinyu_rfid/WriteUserActivity.java b/app/src/main/java/com/example/jinyu_rfid/WriteUserActivity.java
index 7b4fbba..356ce35 100644
--- a/app/src/main/java/com/example/jinyu_rfid/WriteUserActivity.java
+++ b/app/src/main/java/com/example/jinyu_rfid/WriteUserActivity.java
@@ -51,15 +51,20 @@ public class WriteUserActivity extends BaseActivity implements DataReturnCall, P
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = DataBindingUtil.setContentView(this, R.layout.activity_write_user);
- intent1 = new Intent(this, ReadActivity.class);
+
intent2 = new Intent(this, ConfigurationTableActivity.class);
adapter = new ResultAdapter(this);
binding.setAdapter(adapter);
popupMenu = new PopupMenu(this, binding.writeMenu);
popupMenu.setOnMenuItemClickListener(this);
getMenuInflater().inflate(R.menu.activity_menu, popupMenu.getMenu());
- // rfidModel = new C5106Device(this,this);
- rfidModel=new AutoID9UDevice(this,this);
+ rfidModel = new C5106Device(this,this);
+ // rfidModel=new AutoID9UDevice(this,this);
+ if (rfidModel instanceof C5106Device){
+ intent1 = new Intent(this, ReadActivity.class);
+ }else {
+ intent1 = new Intent(this, Read2Activity.class);
+ }
}
@@ -110,7 +115,7 @@ public class WriteUserActivity extends BaseActivity implements DataReturnCall, P
map.put("token", "123456");
map.put("Language", SharedPreferencesUtils.getstring("languageIndex","0"));
Log.e("TAG", "writeUser:" + 2);
- OkGo.post(url + "/write").upRequestBody(RequestBody.create(JSON, gson.toJson(map))).execute(new MyRecultCall(dialog, this) {
+ OkGo.post("http://"+url + "/rfid/write").upRequestBody(RequestBody.create(JSON, gson.toJson(map))).execute(new MyRecultCall(dialog, this) {
@SuppressLint("NotifyDataSetChanged")
@Override
public void onSuccess(Response response) {
@@ -121,12 +126,12 @@ public class WriteUserActivity extends BaseActivity implements DataReturnCall, P
writeUserState = true;
return;
}
-
tipDialog.shouDialog(false, body.getSaveMessage());
}
});
- } //writeUserState = true;
+ }
+ //writeUserState = true;
if (writeUserState){
Log.e("TAG", "写入");
var writeState = rfidModel.writeUser(validateDataLength(user), epcStr);
@@ -155,7 +160,6 @@ public class WriteUserActivity extends BaseActivity implements DataReturnCall, P
}
return paddedData.toString();
}
-
return data;
}
@@ -179,14 +183,13 @@ public class WriteUserActivity extends BaseActivity implements DataReturnCall, P
map.put("TyreNo", erCode);
map.put("token", "123456");
map.put("Language", SharedPreferencesUtils.getstring("languageIndex","0"));
- OkGo.post(url + "/readTyreNo").upRequestBody(RequestBody.create(JSON, gson.toJson(map))).execute(new MyRecultCall(dialog, this) {
+ OkGo.post("http://"+url + "/rfid/readTyreNo").upRequestBody(RequestBody.create(JSON, gson.toJson(map))).execute(new MyRecultCall(dialog, this) {
@SuppressLint("NotifyDataSetChanged")
@Override
public void onSuccess(Response response) {
super.onSuccess(response);
var body = response.body();
if (body.getResultFlag().equals("1")) {
-
list = gson.fromJson(body.getJson(), new TypeToken>() {
}.getType());
list.remove(0);
diff --git a/app/src/main/java/com/example/jinyu_rfid/base/BaseActivity.java b/app/src/main/java/com/example/jinyu_rfid/base/BaseActivity.java
index e7643bc..192dc4a 100644
--- a/app/src/main/java/com/example/jinyu_rfid/base/BaseActivity.java
+++ b/app/src/main/java/com/example/jinyu_rfid/base/BaseActivity.java
@@ -26,6 +26,7 @@ import androidx.core.content.FileProvider;
import com.example.jinyu_rfid.R;
import com.example.jinyu_rfid.dialog.TipDialog;
+import com.example.jinyu_rfid.uitls.SharedPreferencesUtils;
import com.google.gson.Gson;
import java.io.ByteArrayOutputStream;
@@ -42,7 +43,7 @@ import okhttp3.MediaType;
public class BaseActivity extends AppCompatActivity {
- public static String url = "http://rfidtest.jinyutyres.com:8199/rfid";
+ public static String url /*= "http://rfidtest.jinyutyres.com:8199/rfid"*/;
public ProgressDialog dialog;
public Gson gson;
public MediaType JSON = MediaType.parse("application/json; charset=utf-8");
@@ -63,6 +64,13 @@ public class BaseActivity extends AppCompatActivity {
}
+ @Override
+ protected void onResume() {
+ super.onResume();
+ url= SharedPreferencesUtils.getstring("url", null);
+
+ }
+
public class MyReceiver extends BroadcastReceiver {
@Override
diff --git a/app/src/main/java/com/example/jinyu_rfid/been/IPConfigurationVM.java b/app/src/main/java/com/example/jinyu_rfid/been/IPConfigurationVM.java
new file mode 100644
index 0000000..a82003e
--- /dev/null
+++ b/app/src/main/java/com/example/jinyu_rfid/been/IPConfigurationVM.java
@@ -0,0 +1,45 @@
+package com.example.jinyu_rfid.been;
+
+import androidx.databinding.BaseObservable;
+
+/**
+ * @author wanghao
+ * @date 2024/5/15 15:02
+ */
+public class IPConfigurationVM extends BaseObservable {
+
+
+ private String ip, port;
+
+
+ public String getIp() {
+ return ip;
+ }
+
+ public void setIp(String ip) {
+ this.ip = ip;
+
+ }
+
+ public String getPort() {
+ return port;
+ }
+
+ public void setPort(String port) {
+ this.port = port;
+ }
+
+ public IPConfigurationVM() {
+ }
+
+ public IPConfigurationVM(String url) {
+ var split = url.split(":");
+ ip = split[0];
+ port = split[1];
+ notifyChange();
+ }
+
+ public String getUrl() {
+ return ip + ":" + port;
+ }
+}
diff --git a/app/src/main/java/com/example/jinyu_rfid/rfid/AutoID9UDevice.java b/app/src/main/java/com/example/jinyu_rfid/rfid/AutoID9UDevice.java
index 4d0c056..e41807c 100644
--- a/app/src/main/java/com/example/jinyu_rfid/rfid/AutoID9UDevice.java
+++ b/app/src/main/java/com/example/jinyu_rfid/rfid/AutoID9UDevice.java
@@ -32,7 +32,7 @@ public class AutoID9UDevice implements RFIDModel {
this.call = call;
this.context = context;
uhfService = UHFService.getInstance();
- uhfService.setParameters(UHFService.PARAMETER_INVENTORY_SESSION,0);
+ uhfService.setParameters(UHFService.PARAMETER_INVENTORY_SESSION, 0);
if (!uhfService.isopen()) {
uhfService.open();
}
@@ -74,57 +74,60 @@ public class AutoID9UDevice implements RFIDModel {
var bytes = AutoID9UUtil.getHexByteArray(writeStr);
Log.e("TAG", "writeUser:" + tagEpc);
- var b = uhfService.writeTagData(AutoID9UUtil.getHexByteArray(tagEpc), password,
- 3, 0, bytes.length, bytes);
+ var b = uhfService.writeTagData(AutoID9UUtil.getHexByteArray(tagEpc), password, 3, 0, bytes.length, bytes);
return b;
}
- String id = null;
+
+ @Override
+ public void sanUser(int len, String id) {
+ var i = len * 2;
+ byte[] data = new byte[i];
+ String info = null;
+ var result = uhfService.readTagData(AutoID9UUtil.getHexByteArray(id), password, 3, 0, i, data);
+ Log.e("TAG", "按长度读取:" + result);
+ if (result) {
+ info = Tools.Bytes2HexString(data, data.length);
+ }
+
+ call.readUserInfo(info, result, null);
+ }
@Override
public void sanUser(int len) {
var power = uhfService.getPower();
- Log.e("TAG", "设备功率:" + power);
- if (power==0){
- uhfService.close();
+ Log.e("TAG", "开始读取,检查设备功率:" + power);
+ if (power == 0) {
+ // uhfService.close();
uhfService = UHFService.getInstance();
uhfService.open();
- Log.e("TAG", "设备功率:" + uhfService.getPower());
- }
- if (id==null){
- String info = null;
- EPC epc=new EPC();
- var result = uhfService.inventoryOnce(epc, 100);
- Log.e("TAG", "单次寻卡:" + result);
- Log.e("TAG", "epcid:" + epc.getId());
- id=epc.getId();
- return;
+ Log.e("TAG", "重启设备功率:" + uhfService.getPower());
}
-
- // if (result) {
+ String info = null;
+ EPC epc = new EPC();
+ var result = uhfService.inventoryOnce(epc, 100);
+ Log.e("TAG", "单次寻卡:" + result);
+ Log.e("TAG", "epcid:" + epc.getId());
+ var id = epc.getId();
+ if (result) {
var i = len * 2;
byte[] data = new byte[i];
- var result = uhfService.readTagData(AutoID9UUtil.getHexByteArray(id), password, 3, 0, i, data);
+ result = uhfService.readTagData(AutoID9UUtil.getHexByteArray(id), password, 3, 0, i, data);
Log.e("TAG", "按长度读取:" + result);
if (result) {
- var info = Tools.Bytes2HexString(data, data.length);
+ info = Tools.Bytes2HexString(data, data.length);
}
- // }
- // call.readUserInfo(info,result,null);
+ }
+ call.readUserInfo(info, result, null);
}
@Override
public void close() {
+ Log.e("TAG", "设备关闭!");
uhfService.close();
context.unregisterReceiver(scanERCodeReceiver);
}
- //
- // @Override
- // public void loading() {
- // uhfService.close();
- // uhfService.open();
- // Log.e("TAG", "loading:" + uhfService.getPower());
- // }
+
class AutoIDdeviceScanERCodeReceiver extends BroadcastReceiver {
diff --git a/app/src/main/java/com/example/jinyu_rfid/rfid/RFIDModel.java b/app/src/main/java/com/example/jinyu_rfid/rfid/RFIDModel.java
index 2d391de..9334b46 100644
--- a/app/src/main/java/com/example/jinyu_rfid/rfid/RFIDModel.java
+++ b/app/src/main/java/com/example/jinyu_rfid/rfid/RFIDModel.java
@@ -10,5 +10,10 @@ public interface RFIDModel {
boolean writeUser(String writeStr, String tagEpc);
void sanUser(int len);
+
+ default void sanUser(int len, String id) {
+
+ }
+
void close();
}
diff --git a/app/src/main/res/layout/activity_app_login.xml b/app/src/main/res/layout/activity_app_login.xml
index 716d620..b1d0b9a 100644
--- a/app/src/main/res/layout/activity_app_login.xml
+++ b/app/src/main/res/layout/activity_app_login.xml
@@ -79,5 +79,16 @@
android:text="@string/login_button_name"
android:textSize="20sp"
android:textStyle="bold" />
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_blue_tooth_server.xml b/app/src/main/res/layout/activity_blue_tooth_server.xml
deleted file mode 100644
index fa8897a..0000000
--- a/app/src/main/res/layout/activity_blue_tooth_server.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_ipconfigura.xml b/app/src/main/res/layout/activity_ipconfigura.xml
new file mode 100644
index 0000000..370db45
--- /dev/null
+++ b/app/src/main/res/layout/activity_ipconfigura.xml
@@ -0,0 +1,88 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 1c25fd2..1636825 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -111,6 +111,17 @@
android:text="@string/login_button_name"
android:textSize="20sp"
android:textStyle="bold" />
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_autoid_read.xml b/app/src/main/res/layout/activity_read2.xml
similarity index 82%
rename from app/src/main/res/layout/activity_autoid_read.xml
rename to app/src/main/res/layout/activity_read2.xml
index 0d35d37..b3b0d0d 100644
--- a/app/src/main/res/layout/activity_autoid_read.xml
+++ b/app/src/main/res/layout/activity_read2.xml
@@ -14,6 +14,7 @@
type="com.example.jinyu_rfid.adapter.ResultAdapter" />
+
@@ -21,12 +22,11 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
- tools:context=".ReadActivity">
+ tools:context=".Read2Activity">
-
-
-
-
+ android:layout_height="50dp"
+ android:layout_marginEnd="8dp"
+ android:layout_marginStart="8dp"
+ android:onClick="read2EPC"
+ android:textSize="16sp"
+ android:text="@string/read_epc" />
+
+
diff --git a/app/src/main/res/values-en-rUS/strings.xml b/app/src/main/res/values-en-rUS/strings.xml
index fcd0999..df9252e 100644
--- a/app/src/main/res/values-en-rUS/strings.xml
+++ b/app/src/main/res/values-en-rUS/strings.xml
@@ -37,4 +37,7 @@
I see
Bluetooth not connected, program exits
Connection successful
+ service address
+ service port
+ Label error, unable to parse
\ No newline at end of file
diff --git a/app/src/main/res/values-vi-rVN/strings.xml b/app/src/main/res/values-vi-rVN/strings.xml
index d4075bf..18dca19 100644
--- a/app/src/main/res/values-vi-rVN/strings.xml
+++ b/app/src/main/res/values-vi-rVN/strings.xml
@@ -38,4 +38,7 @@
Tôi biết rồi
Bluetooth không kết nối, chương trình thoát
Kết nối thành công
+ Địa chỉ dịch vụ
+ Cổng dịch vụ
+ Lỗi thẻ, không thể giải quyết
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index d52e2d3..37c9cdf 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -36,5 +36,8 @@
扫描区域
我知道了
蓝牙未连接,程序退出
- 蓝牙连接成功>
+ 蓝牙连接成功
+ 服务地址
+ 服务端口
+ 标签错误,无法解析>
\ No newline at end of file