完成 配置功能
parent
fa86e651ce
commit
a88d5e017f
@ -0,0 +1,40 @@
|
||||
package com.example.jinyu_rfid.been;
|
||||
|
||||
/**
|
||||
* @author wanghao
|
||||
* @date 2024/5/20 16:33
|
||||
*/
|
||||
public class ReadTyreNoResult {
|
||||
/**
|
||||
*
|
||||
"PropertyName": "胎号",
|
||||
"PropertyContent": "32432040640",
|
||||
"PropertyIndex": 1
|
||||
*/
|
||||
private String PropertyName, PropertyContent;
|
||||
private int PropertyIndex;
|
||||
|
||||
public String getPropertyName() {
|
||||
return PropertyName;
|
||||
}
|
||||
|
||||
public void setPropertyName(String propertyName) {
|
||||
PropertyName = propertyName;
|
||||
}
|
||||
|
||||
public String getPropertyContent() {
|
||||
return PropertyContent;
|
||||
}
|
||||
|
||||
public void setPropertyContent(String propertyContent) {
|
||||
PropertyContent = propertyContent;
|
||||
}
|
||||
|
||||
public int getPropertyIndex() {
|
||||
return PropertyIndex;
|
||||
}
|
||||
|
||||
public void setPropertyIndex(int propertyIndex) {
|
||||
PropertyIndex = propertyIndex;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.example.jinyu_rfid.broadcast;
|
||||
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.util.Log;
|
||||
|
||||
import com.example.jinyu_rfid.callback.DataReturnCall;
|
||||
|
||||
public class ScanERCodeReceiver extends BroadcastReceiver {
|
||||
private DataReturnCall call;
|
||||
|
||||
public ScanERCodeReceiver() {
|
||||
}
|
||||
|
||||
public ScanERCodeReceiver(DataReturnCall call) {
|
||||
this.call = call;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
byte[] data = intent.getByteArrayExtra("data");
|
||||
if (data != null) {
|
||||
String barcode = new String(data);
|
||||
Log.e("", "onReceive, data:" + barcode);
|
||||
call.readerCodeInfo(barcode);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue