|
@@ -1,6 +1,7 @@
|
|
package com.zzliaoyuan.power_sensor.fragment;
|
|
package com.zzliaoyuan.power_sensor.fragment;
|
|
|
|
|
|
-import android.os.Bundle;
|
|
|
|
|
|
+import android.Manifest;
|
|
|
|
+import android.media.MediaScannerConnection;
|
|
import android.os.Environment;
|
|
import android.os.Environment;
|
|
import android.util.Log;
|
|
import android.util.Log;
|
|
|
|
|
|
@@ -51,7 +52,7 @@ public class UHFReadTagFragment {
|
|
|
|
|
|
|
|
|
|
// wsdd userd
|
|
// wsdd userd
|
|
- public void onCheckedChanged(int checkedId) {
|
|
|
|
|
|
+ public void setUserModel() {
|
|
// 设置循环盘点同时读取 EPC、TID、USER 模式
|
|
// 设置循环盘点同时读取 EPC、TID、USER 模式
|
|
mContext.mReader.setEPCAndTIDUserMode(0, 24);
|
|
mContext.mReader.setEPCAndTIDUserMode(0, 24);
|
|
readAssets();
|
|
readAssets();
|
|
@@ -171,6 +172,7 @@ public class UHFReadTagFragment {
|
|
}
|
|
}
|
|
|
|
|
|
public void readAssets() {
|
|
public void readAssets() {
|
|
|
|
+ assetsList = new ArrayList<String>();
|
|
try {
|
|
try {
|
|
// 存放的文件路径
|
|
// 存放的文件路径
|
|
File assetsFile = new File(
|
|
File assetsFile = new File(
|
|
@@ -229,6 +231,7 @@ public class UHFReadTagFragment {
|
|
if (!file.exists()) {
|
|
if (!file.exists()) {
|
|
file.createNewFile();
|
|
file.createNewFile();
|
|
}
|
|
}
|
|
|
|
+// MediaScannerConnection.scanFile(mContext, new String[] { file.getAbsolutePath() }, null, null);
|
|
assetsList.add(asset);
|
|
assetsList.add(asset);
|
|
RandomAccessFile raf = new RandomAccessFile(file, "rwd");
|
|
RandomAccessFile raf = new RandomAccessFile(file, "rwd");
|
|
raf.seek(file.length());
|
|
raf.seek(file.length());
|